Havok を使用するプロジェクトで VS2010 を使用していますが、最新リリースには VS2008 以前のバイナリしかありません。VS によって生成された埋め込みマニフェストには、次のものが含まれます。
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
どうやら VS は 2010 年以降サイド バイ サイド アセンブリ ( source )を使用しなくなったため、私の winsxs ディレクトリにはデバッグ crt アセンブリがインストールされておらず、vs 再頒布可能パッケージはデバッグ バージョンをインストールしていません。埋め込まれたマニフェストで Havok を使用する dll をコンパイルすると、dll をロードするアプリケーションが起動しなくなります。
sxstrace を実行したところ、次の結果が得られました。
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at G:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at D:\Projects\GTS new\bld\Debug\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at D:\Projects\GTS new\bld\Debug\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at D:\Projects\GTS new\bld\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at D:\Projects\GTS new\bld\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.
(おそらく)VS2008がインストールされているため、アプリケーションは私の同僚のマシンの1つで動作しますが、VS2010しかインストールされていないため、別の同僚や私のマシンでは動作しません。動作中のマシンの winsxs ディレクトリにある唯一の debugcrt ファイルは次のとおりです。
x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb
dll、.manifest ファイル、および .cat ファイルを含むフォルダーとして (同じ publicKeyToken で異なるバージョン)
ファイルを winsxs ディレクトリにコピーしようとしましたが、問題は解決しませんでした。dll をバイナリのあるディレクトリに直接配置しても、何も起こりませんでした。ファイルをbin\Microsoft.VC90.DebugCRT.DLL
(sxstrace に従って検索されたディレクトリの 1 つだったので) 配置しても役に立ちませんでしたが、sxstrace からの出力は次のように変わりました。
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at G:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at D:\Projects\GTS new\bld\Debug\Microsoft.VC90.DebugCRT.DLL.
INFO: End assembly probing.
ERROR: Activation Context generation failed.
(検索を停止し、参照を解決できますが、コンテキストの生成はまだ失敗します)
機能する唯一のことは、埋め込みマニフェストの生成を無効にすることです。これを解決する別の方法はありますか?