How to upgrade VS2008 from version 9.0.21022.8 RTM to 9.0.30729.4462 QFE (to hopefully resolve __forceCRTManifestCUR error)

StackOverflow https://stackoverflow.com/questions/11203893

Domanda

I've recently installed VS2008 on a new machine, and now find that it will not link with DLLs built on an older machine, giving error LNK2001: unresolved external symbol __forceCRTManifestCUR. I presume that this pertains to an issue with Side-By-Side.

Having researched a little, I now suspect that the issue is that the old VS2008 installation is upgraded to version 9.0.30729.4462 QFE, whereas the new VS2008 installation is on 9.0.21022.8 RTM.

On researching further, I read that I needed to install SQL Server 2008 to at least SP1 in order to upgrade VS2008 to the later version. I installed SQL Server 2008 on the new machine however, and it is now at SR3, yet VS2008 is still on version 9.0.21022.8. I suspect that the SQL Server that I installed was pre-service-packed up to SR2, and that this might be the problem.

Windows (Microsoft) Update shows no pending updates for either SQL Server 2008 or Visual Studio 2008.

Please can you suggest a way of forcing Visual Studio to upgrade to the 9.0.30729.4462 QFE version?

Alternatively, are there any other solutions to this problem that don't involve recompiling all of my precompiled DLLs?

È stato utile?

Soluzione 3

Whoops - it looks like I had been totally misled by Microsoft.

It turns out that it is Visual Studio Service Pack 1 that updates the version from 9.0.21022 to 9.0.30729.

I was convinced that I already had SP1 installed because:

a) The About dialog mentioned SP1 explicitly (though this turned out to be .Net 3.5 SP1 not Visual Studio 2008 SP1)

b) Windows Update did not offer SP1 for download, and all of the "Check for update" links route to a page that instructs you to use Windows Update.

Subsequent to my original question, I had managed to get my source-base to build by installing the C++ Feature Pack for VS2008, but nothing would run due to Side-by-Side errors. Eventually it occurred to me that maybe the SP1 had not been installed.

Altri suggerimenti

A late reply, I know, and more for posterity, but I had a similar discrepancy between the installations of VS 2008 on two machines. One reported version "9.0.30729.1 SP", and the other "9.0.30729.4462 QFE". I wanted them to be the same, and knew the first had already had the service pack installed.

This post inspired me to try installing SQL 2008 R2 on the first, and this turned out to be the key. Following this, both VS versions were ".4462 QFE".

yet VS2008 is still on version 9.0.21022.8

It is not, your #includes and CRT libraries did in fact get upgraded to 9.0.30729.4462 when you installed the hotfix/service pack/security patch.

Open vc/include/crtassem.h to see the macro soup. What matters is the _BIND_TO_CURRENT_CRT_VERSION macro value that's in effect when you compile your code. When set to 0, you'll declare a dependency on the original RTM version of the CRT (9.0.21022.8). With fingers crossed behind your back that Microsoft didn't make any changes in the CRT that will break your code when it runs on a machine that has a publisher policy installed that redirects to a later CRT version.

With it set to 1, you'll declare a dependency on the version of the CRT that you actually tested your code with, the one that's installed on your dev machine. Which is the more sane thing to do. Albeit that Microsoft went through some trouble to ensure that service patches to the CRT didn't break anything, I never heard of a case where this happened.

What the linker warning is trying to tell you, ever so clumsily, is that you are trying to link code that was compiled with _BIND_TO_CURRENT_CRT_VERSION set to 0 with code that was compiled with it set to 1. Which of course makes no sense, you can't have it both ways.

Fix the compiler settings, they must be the same for all code you link.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top