0

I have a .NET 3.5 web app (built with VS2008) that I am trying to port to a .NET4.0 web app (built with VS2010). It contains mostly pure managed C# assemblies, but it also contains a mixed mode C++ assembly. It is not currently an option to port the code to target .NET4, so I would like to run all the 3.5 asssemblies in the 4.0 process. When it's spinning up the app I am getting an error loading the CRT...the exact error (with a debug build) is "Unable to find assembly 'msvcm90d, Version=9.0.30729.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'." I have verified that that assembly is present on my machine and it does find it and load it successfully when running under the v2.0 CLR. Both the managed and native manifests for the assembly appear to be identical when compiling under VS2008 vs VS2010, so I'm not sure why the v4.0 loader can not load the CRT.

I have added the startup config option in the config file like so, but it makes no difference:

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" />
</startup>
redec
  • 577
  • 2
  • 13
  • Since it says "can not find assembly", try the fusion log viewer: http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.100).aspx It logs all attempts to find assemblies and WHERE it tried to search them. It might help finding what is going on. – sinni800 Nov 01 '12 at 17:46
  • I should have mentioned that...I have looked at the bind error and it is looking in the normal places you'd expect - the GAC, the shadow copy dir, and the application root....the CRT is in the winsxs directory, as it should be. When the application is executed under the 2.0 CLR it will actually generate the same bind 'failure' in the log, but the application works fine (this seems to be normal behaviour from what I can tell...) – redec Nov 01 '12 at 19:41
  • I am fresh out of ideas now, good luck! – sinni800 Nov 01 '12 at 20:19

0 Answers0