Page 1 of 1
IA v9 R2 not compiling .NET4 assemblies
Posted: Tue May 11, 2010 3:00 am
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
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Tue May 11, 2010 2:16 pm
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.
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Wed May 12, 2010 3:01 am
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.
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Wed May 12, 2010 3:21 am
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.
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Wed May 12, 2010 3:45 am
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?
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Wed May 12, 2010 5:11 pm
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.
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Thu May 13, 2010 12:59 am
by alma88
How can I detect whether .NET4 is present?
Re: IA v9 R2 not compiling .NET4 assemblies
Posted: Thu May 13, 2010 1:09 am
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