I
I
Ivan Bibik2015-07-29 22:28:55
.NET
Ivan Bibik, 2015-07-29 22:28:55

Can't resolve assembly VC90.DebugCRT?

Good day!
Given: I'm trying to transfer a project written in Visual Studio 2008 using QT 4 to Visual Studio 2012 using the same QT4. I collect in the Debug configuration and when I start the application I get:

Activation context generation failed for "....". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

I understand that the problem is with VCRedist, I put the desired version, reboot, I get the same thing. I change the configuration from Debug to Release, build the project, look at the manifest, and there again this ill-fated Microsoft.VC90.DebugCRT. I delete the Debug prefix and, lo and behold, the application starts up and works. But what about debugging? I tried to slip files from the VC90.DebugCRT folder into the folder with the executable file, but as a result the executable file finds what it needs, but the QT libraries begin to swear, since now they cannot find VC90.DebugCRT. I also tried to register dependencies in the project settings and indicated the paths in various places to the required assembly. As far as I understand, since studio 12 is used, Redist also uses the corresponding version. How to fix everything? Where to look?
Thank you for your attention!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2015-07-30
@xxxbibxxx

So, firstly, you need to use one toolchain (compiler) for Qt and for your application, otherwise there will be a huge number of strange problems. Because you are developing in the 2012 studio, and, unfortunately, the 4th kit was not officially planned for this studio, you will have to at least install a compiler from the 2010 studio (I don’t remember, maybe the 2012 can be targeted to the old compiler in order to do not install the entire 2010 studio). You can try to build from source, but I can't call it a simple matter.
Secondly, if we imagine that you have completed the previous step, and you have compiled Qt and a compiler of the same version, then depending on the configuration (Debug|Release), your program will link to different runtimes. Runtime DLLs have a 'd' at the end of the filename. For different versions of VC++ they are named differently:
msvcr90[d].dll+msvcp90[d].dll - Visual Studio 2008 (MSVC 9.0)
msvcr100[d].dll+msvcp100[d].dll - Visual Studio 2010 (MSVC 10.0 )
msvcr110[d].dll+msvcp110[d].dll - Visual Studio 2012 (MSVC 11.0)
msvcr120[d].dll+msvcp120[d].dll - Visual Studio 2013 (MSVC 12.0)
Why did I bring this up - because. your error most likely came from the side-by-side subsystem, and is associated with a conflict of library versions, as a workaround, I advise you to find debug libraries where you have the studio installed, and copy them to your application's exe file so that these libraries are picked up priority. However, before you do that, try the following:
0) Understand the version of the compiler that Qt was built against. Perhaps the best solution is to install the compiler from 2010, without solving this issue it is impossible to continue to work normally
1) make sure that you rebuilt the project (do Rebuild All)
2) install updates on the 2012 studio if it is not the latest version
If the problem persists, take Dependecy Walker, set the Exe-socket on it, and check where it pulls the debug libraries from.
If you have questions - in the comments.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question