I have a pretty complex WPF and C++/CLI application that was built using .NET 3.5. We've migrated to 4.0 to take advantage of the WPF goodies, so all our projects in the solution are targeting 4.0.
On running our application on XP machines with just 4.0 (and MSVC++ 2010 [and 2008]), an error dialog will pop up with the message:
"To run this application, you first must install one of the following version of the .NET framework: 2.0.50727"
If I go install .NET 2.0 with .NET 4.0 my application will run.
Anyone know how to debug loading the assemblies to find out what's going on?
UPDATE
I just found out about the "Modules" window in VS2010, and also watched the Modules loaded events in the output window when running in the debugger. I can clearly see there's a single .NET 2.0 module running with my application.
'Kudu.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Exports loaded.
'Kudu.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll', Exports loaded.
'Kudu.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5\msvcr80.dll', Exports loaded.
Is there any way to see what loaded this?