Thoughts about .NET Framework 4
Created: 25 Aug 2010 | 7 comments
Has anyone yet encountered applications coded with .NET Framework version 4? We are likely to begin using the new Framework at som point and then we (that means me) have to do something for the packaging. The current Wise tools cannot install assemblies to the new GAC in .NET version 4. I am leaning towards another installation tool, unless Symantec has plans for adding support for .NET 4 in the near future. I am not going to use gacutil, because we have to use Windows Installer as far as possible. Thoughts?
Discussion Filed Under:
Comments
Include it in the build
My recommendation is to include ALL the net frameworks in an operating system build now, or at the next update, as it can only be a matter of time before apps appear which require .NET4
You now have a client and full version to choose from, and a 32 bit or 64 bit version as well.
Like the other frameworks, it can be installed with some command line switches, so there is no reason why you cannot include it as a pre-requisite in an EXE compilation of your MSI.
Incidentally, Microsoft KB 318785 has a great list of detection methods for all versions of the .NET framework
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
I think you misunderstood.
I think you misunderstood. The problem is not installing the Framework, it can be installed easily. The problem is packaging applications that are built with .NET 4, because in .NET 4, assemblies should be installed to %windir%\Microsoft.NET\assembly\GAC* instead of %windir%\assembly.
Or maybe .NET 4 assemblies
Or maybe .NET 4 assemblies will be installed automagically to the right place? I guess I have to try it.
If I recall correct ;) The
If I recall correct ;)
The easiest way to add the assembly to the right location you add the file to ex. the default installdir within the project and then select detail on the component holding the file and select .NET and it should install correctly.
Well, that's what we have
Well, that's what we have been doing since day one. And the few times the .NET Framework have changed, it has worked fine, because .NET 2.0 to 3.5 SP1 has been essentially backwards compatible. If you look at the manifest of a .NET 3.5 assembly it says Metadata version: v2.0.50727, e.g. it still pretends to be a .NET 2.0 component. And it is still installed to %windir%\assembly. In theory, a .NET 2.0 source file compiled with the .NET 3.5 Framework can still run on a computer with only .NET 2.0 Framework installed.
.NET 4 has changed all of this. In the manifest it says Metadata version: v4.0.30319. And the file should be installed to %windir%\Microsoft.NET\assembly\. Microsoft has cut off the backwards compatibility.
I created a sample project with Wise. When adding .NET files created with .NET 3.5 it works fine. When trying to add files created with .NET 4.0 I get the following error message:
I can add the file, but no .NET attributes appear in the Assembly tab of the file properties. Thus, the MsiAssemblyname table is not populated and the resulting MSI package is invalid and cannot be installed.
Conclusion. It is not possible to author MSI packages that contains .NET 4.0 assemblies with the current Wise products.
>leaning towards another installation tool...
...unless Symantec has plans for adding support for .NET 4 in the near future.
Hot damn! For the second time this week, I have to start holding my breath. Don't you hold yours, will you?
Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.
That's just the obligatory
That's just the obligatory comment. From experience, those breath pauses keep pushing records every time. Now that I think of it, working with these software tools is kind of an apnea experience.
Would you like to reply?
Login or Register to post your comment.