I have an app that fails because mscorlib is not installed from Net Framework 2 SP2
Without it, I get the following error:

Could not load type 'System.DateTimeOffset' from assembly
'mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.

The error can not be trapped in the runtime of the application, it appears when app is loaded, similar to when a project is loaded in NET 2010 development

on development projects/properties/compile/advanced compile options it is NET Framework 2

In distributed project/view/launch conditions/net framework/properties Version is NET Framework 2

When SP2 is installed a later version of mscorlib (which is the problem) is installed, but copying the new mscorlib.dll to the old SP1 version does not work

How do I get my install msi package to run SP2 if SP2 is not installed, it seems as long as Net Framework 2 is installed it does not check for updates

have an old Dell pc with XP on it with XP sp3 to test all my apps, hence my problem was found using this pc.

I have now found this comment from

http://blogs.msdn.com/b/astebner/archive/2008/10/12/8996850.aspx

"There are a few caveats to keep in mind when using the .NET Framework 2.0 SP2 and 3.0 SP2 bootstrapper packages:

They only support installing on Windows XP and Windows Server 2003.  You cannot use them on Windows Vista or Windows Server 2008.  If you need to install the .NET Framework 2.0 SP2 or 3.0 SP2 on Vista or Windows Server 2008 as a part of your application installer, you should use the .NET Framework 3.5 SP1 bootstrapper package that is included with Visual Studio 2008 SP1 instead.
They do not support the "Download components from the component vendor's web site." option.  This means when you build your installer and include one of these bootstrapper packages, you will see build warnings about the HomeSite attribute, and the full contents of the .NET Framework 2.0 SP2 and/or 3.0 SP2 installers will be included next to setup.exe in your build output.  If you would prefer to have download-on-demand functionality for the .NET Framework in your setup, then you should use the .NET Framework 3.5 SP1 bootstrapper package instead."

It would therefore appear that to enable my app to run effectively on XP/Vista/Windows 7 I will have to create my setup package using Net Framework 3.5

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.