views:

47

answers:

3

Hi,

I've developed a 64 bit dll using C++ and Visual Studio 2008 and i'm trying to register it on a target machine using 'regsvr32.exe'. I've checked the manifest file and it clearly states what version of CRT is needed:

 <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='amd64' publicKeyToken='1fc8b3b9a1e18e3b' />

When i try to register the file i always get a side-by-side error message stating that the application settings are incorrect and that i should reinstall it.

Log Error: Generate Activation Context failed... Reference error message: The referenced assembly is not installed on your system.

The target machine runs Windows Xp Professional 64 bit. I've tried to install the corresponding VC++ redistributable package( VC++ 2008 Redist x86 and x64 ), create a setup and include the corresponding merge module ( microsoft_vc90_crt_x86_x64.msm ), install all VC++ redistributable packages etc. No matter what's installed it will always fail.

If i check for the dependent files and they are correctly located inside the WinSxS folder, but if i run Dependency Walker on the file it will complain too that the files from the VC9 CRT could not be found.

If i build the file for 32 bit it will correctly register on a 32 bit OS. I'm running out of ideas so any help is very appreciated.

Thanks,

Adrian.

EDIT *This is reproductible only on Win XP 64, all works fine on Windows 7 64 bit.

+1  A: 

I'm no expert in installers but have you thought about distributing the redistributable's in the root folder of your application?

As for me, I've never heard of using regsvr32.exe to install crt redist's.

C Johnson
Hi, in this case deploying the redis in the same folder is not applicable and i'm not using regsvr32 to install them, i'm using it to register my dll because it's a COM component.
Adrian Faciu
+1  A: 
<assemblyIdentity type='win32' name='Microsoft.VC90.CRT' ...

shouldn't it be

<assemblyIdentity type='win64' name='Microsoft.VC90.CRT' ...

?

You need the 64-bit runtime

Anders K.
That makes sense, but the manifest is generated by VS and i thought that it should know what is doing. I'll try to change it and see how it's working.
Adrian Faciu
+1  A: 

It sounds like despite the app is 64 bit it's looking for the 32bit crt dlls. Did you try to install the 32bit redistributable package?

Here is a good description on how to track down SideBySide failures: http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx

jdehaan
Yes, i've installed both versions of the redistributable packages but no change, thanks for the link i'm looking at it.
Adrian Faciu