Exporting C# Produced Workbook Built with .Net 4.5 to Systems Running .Net 3.x

81 Views Asked by At

This is probably a very simple question for you all who thoroughly understand InterOp. I have an app that builds an Excel workbook consisting of four worksheets with the last sheet containing charts and tables derived from the data on the other three spread sheets. I’m working in C# using Visual Studio 2010 and .NET 4.5. (I must use 4.5 to produce the 3-D charts required). Everything is working fine as I develop and test in my environment. But when I install the app on an XP machine running .NET 3.x I get a message saying it is necessary to install .NET 4. My question: Is there any way I can include the necessary elements of .NET 4 in my install package so the user will not have to also install .NET 4?

1

There are 1 best solutions below

1
On

If you use InstallShield (instead of MS setup which is deprecated after VS 2010), the Project Assistant tab for Installation Requirements will allow you to specify minimum requirements needed for the install. Since there are all sorts of files and registry settings for .NET 4.5, I think it could very easily blow your user out of the water if you try to manually muck with assemblies.

To get fancy, you could download and include the .NET 4.5 installer in the Application Files tab so that the user would not necessarily have to download; though downloading by the user will make sure they have the latest and greatest.