I have a C++/CLI project that was created in VS2005. I'm hoping to run this in VS2010 (or 2012) as that is my main IDE and I need to modify some things in the C++/CLI project as well and its irritating to have to switch back and forth to vs2005 to recompile, copy etc. The other important reason is my projects running in VS2010/2012 are in .NET4 so there is no option to move everything on to VS2005.
The project has dependencies on unmanaged third party libraries that themselves have dependencies on the debug versions of the c++ redistributable libraries (msvcr80.dll, msvcm80.dll, msvcp80.dll)
When I first ran the upgraded project I received 'specified module could not be found' -
It was then I noticed the cli project is being compiled against the later versions of msvc (msvcr90.dll)
cli assembly dependencies as per depends; vs2005 on left vs 2008 on right
Is there any way to make a later version of VS compile using the 2005 libraries?
update its not vital which one it compiles against (and may not be possible anyway) but is it possible to run and debug both side by side? When I try to run the compiled project I get this error message:
I've tried copying the manifest file from the vs2005 project to the vs2010 project but this does not work (same error message). I also disabled the embedded manifest and replaced the generated .manifest file with the one from vs2005 and this does not work either.
update2 I've got past this error by specifying the msvcr libraries in the manifest:
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
however now when I run my application one of the third party libraries throws an AccessViolationException - Attempted to read or write protected memory
when I try to use one of the methods. This code otherwise works fine in vs2005.
I have since discovered Daffodil for Visual Studio which does exactly what I need, namely compile against vc80 in visual studio 2010. After installation the Platform Toolset dropdown gets a few more options:
nb, you still need to have the relevant version of Visual Studio installed, eg if targeting vc80 you need vs2005. nb2, Intellisense is broken in vs2010 for cli/c++ which is a major letdown after the amount of time researching getting the project to work on vs2010
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With