ILMergeを使用して、 Windows Azure SDK 2.0を含む単一の実行可能ファイルを作成しようとしていますがMicrosoft.WindowsAzure.ServiceRuntime.dll
、それを含む NuGET パッケージが見つからなかったため、手動で追加しました。
VS2012 ビルド後のイベントで次のコマンド ラインを使用しています。
/wildcards /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:ILMerge.log /closed Output.exe *.dll /out:Executable.exe
ILMerge.log
ただし、ビルド後に出力ウィンドウに問題がまったく報告されていないにもかかわらず、次のエラーが表示されます。
The assembly 'Microsoft.WindowsAzure.ServiceRuntime' was not merged in correctly. It is still listed as an external reference in the target assembly.
An exception occurred during merging:
ILMerge.Merge: The assembly 'Microsoft.WindowsAzure.ServiceRuntime' was not merged in correctly. It is still listed as an external reference in the target assembly.
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
そして、実行可能ファイルを開くと、次の例外がスローされます。
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.IO.FileNotFoundException: Could not load file
or assembly 'msshrtmi, Version=2.0.0.0, Culture=neutral, publicKeyToken=31bf3856ad364e35'
or one of its dependencies.
また、マージせずに同じ出力をテストしましたが、正常に動作します。
ここで何が欠けていますか?