How can I determine what is referencing Microsoft.VC90.DebugCRT?

I have a large web application project including C #, C ++ and C code, with many references (project references, DLL references) and I'm doing a release build. When testing my program in a virtual machine, I get the following error:

Could not load file or assembly <MyAssembly.DLL> or one of its dependencies.
The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log or use the command-line sxstrace.exe tool for more detail.

      

So, I check the event log and I find this:

Activation context generation failed for "C:\Windows\Microsoft.NET\Framework\...\MyAssembly.DLL".
Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",
publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
could not be found. Please use sxstrace.exe for detailed diagnosis.

      

I also used sxstrace as suggested and just ended up with a file that reads:

ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",
publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"

      

I checked the config for my projects and they are all set to build in version. Why is MyAssembly referring to Microsoft.VC90.DebugCRT? And how can I fix this?

Please note that I have installed x86 and x64 MSVC ++ on my VM.

EDIT I was also running the dependency hangup on MyAssembly.dll and I had a bunch of entries that said "Error opening file. The system cannot find the file specified":

API-MS-WIN-... (4x)
EXT-MS-WIN-...
MSVCM90D.DLL
MSVCR90.DLL
MSVCR90D.DLL
IESHIMS.DLL
MFPLAT.DLL
SETTINGSYNPOLICY.DLL
WLANAPI.DLL

      

+3


source to share


1 answer


As mentioned in some comments, the solution is to use a dependency walker.



Indeed, MyAssembly.dll was built with Debug config, although I chose Release in Visual Studio. The reason was that I was triggering a post-build event that triggered an msbuild in the target WebPublish, but it did not explicitly specify the Release config, so it decided to use Debug.

+1


source







All Articles