IA v9 R2 not compiling .NET4 assemblies

Got a problem you cannot solve? Try here.
Post Reply
alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

IA v9 R2 not compiling .NET4 assemblies

Post by alma88 »

I am getting the following error while using IA v9 R2 to compile a project that includes .NET4 assemblies. This project (and this assembly) compiled fine with the previous v9 release with the patch for .NET4 applied. What could I be doing wrong? Do I correctly assume that R2 is now supporting .NET4 out of the box?

Error during build: Unable to get assembly information for D:\Development\Distribution\Development Toolkit\WCFX\Enterprise\Assembly\Noemax.WCFX.Net4.dll
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: IA v9 R2 not compiling .NET4 assemblies

Post by MichaelNesmith »

Yes, it does. You may have a version conflict (ex: trial of v9, license of v9r2, or the opposite).

You can also try the updated file if you need a temp band-aid.

If the issue persists, please send the assembly over.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

Re: IA v9 R2 not compiling .NET4 assemblies

Post by alma88 »

Thanks, I regenerated the license and this resolved the problem with IA 9vR2 not compiling .NET4 assemblies. But now we have a new problem.

We provide components for .NET developers. Our products include assemblies for various versions of .NET, including 3.5 and 4. Our installation package registers all our assemblies in the GAC. Obviously, our .NET3.5 assemblies are to go into a different GAC than our .NET4 assemblies.

Whenever the target computer on which the installation is performed does not have .NET4 installed, our installation fails with a fatal error (code 2337). My guess is that IA is unable to deliver the assemblies into the .NET4 GAC, since it the .NET4 GAC does not exist in computers which don't have .NET installed yet.

I would like make my script ignore all problems related to GAC assembly registration, so that if some assemblies have problems getting into a particular GAC for whatever reason, the installation does not fail with a fatal error but instead proceeds to register the rest of our assemblies for other .NET versions. So when a specific version of .NET is not available on the target computer, our assemblies for this version simply do not go into the GAC of that particular .NET version. Is that possible?

I have sent one of our .NET4 assemblies to support @ your domain.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: IA v9 R2 not compiling .NET4 assemblies

Post by MichaelNesmith »

Actually, InstallAware 9 R2 has also been updated for all kinds of assembly options - using .NET 4 FX components where possible (regasm, installutil, ngen).

The GAC'ing is handled internally by Windows Installer and may be falling out of scope. I will have to research this and get back to you.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

Re: IA v9 R2 not compiling .NET4 assemblies

Post by alma88 »

What you are stating is generally correct. Everything is ok when .NET4 is installed. If you haven't already done so, try installing .NET4 assemblies on a non-.NET4 machine and see what happens.

My impression is that if the script failed silently (instead of throwing a fatal error) and was thus permitted to continue with the installation of the remaining assemblies (for the other .NET versions) then this would be a good enough workaround.

Is this a good idea, can you implement it? Otherwise, can I modify my script to implement a similar behavior?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: IA v9 R2 not compiling .NET4 assemblies

Post by MichaelNesmith »

Maybe, what you need to do is develop two sets of Install Assembly statements (one with and one without GAC), and then if .NET 4 is absent, wrap the statements inside an If...End block to achieve your end-goal.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

Re: IA v9 R2 not compiling .NET4 assemblies

Post by alma88 »

How can I detect whether .NET4 is present?
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: IA v9 R2 not compiling .NET4 assemblies

Post by bokkie »

alma88 wrote:How can I detect whether .NET4 is present?
Off the bat you could try looking for this folder: C:\Windows\Microsoft.NET\Framework\v4.0.30319
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
Post Reply