退出我有,我在AfterBuild目標運行ILMerge C#項目。但是,我收到一條消息,告訴我我的命令失敗,並以代碼-1073741701退出。ILMerge代碼爲-1073741701
奇怪的事情對我來說是,如果我寫的運行在命令提示符下輸出命令,它成功。任何想法 ?
一個提示:我使用ILMerge合併與「經典」 .NET項目Silverlight構建的項目。你可以在http://euss.codeplex.com找到這個項目。害我麻煩的項目是Evaluant.Uss.PersistenceEngine.Contracts
這是我跑創建我ilmerge命令
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='false' and '$(FwkLibPath)\.'!='%(RootDir)%(Directory).'">
<Output TaskParameter="Include" ItemName="libPaths" />
</CreateItem>
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true'">
<Output TaskParameter="Include" ItemName="IlmergeAssemblies" />
</CreateItem>
<Exec Command=""$(SolutionDir)Dependencies\ILMerge\Ilmerge.exe" /target:library /lib:"$(FwkLibPath)" @(libPaths->'/lib:"%(RootDir)%(Directory)."', ' ') "/targetplatform:v2,$(FwkLibPath)" /out:"$(MergedOutDir)$(RootNamespace)$(Suffix)" "$(ProjectDir)@(IntermediateAssembly)" @(IlmergeAssemblies->'"%(FullPath)"', ' ')" />
中的MSBuild它產生在輸出窗口如下:
P:\Developpement\euss\Dev\ProvideMultiplatformVersions.proj(42,5): error MSB3073: The command ""P:\Developpement\euss\Dev\Dependencies\ILMerge\Ilmerge.exe" /target:library /lib:"C:\Windows\Microsoft.NET\Framework\v2.0.50727" /lib:"P:\Developpement\euss\Dev\Assemblies\." "/targetplatform:v2,C:\Windows\Microsoft.NET\Framework\v2.0.50727" /out:"P:\Developpement\euss\Dev\Assemblies\Net\Evaluant.Uss.PersistenceEngine.Contracts.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.PersistenceEngine.Contracts\obj\Debug\Evaluant.Uss.PersistenceEngine.Contracts.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.Commands.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.Domain.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.Era.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Metadata\bin\Debug\Evaluant.Uss.MetaData.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.MetaData.Light.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.Model.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.PersistenceEngine.Contracts\bin\Debug\Evaluant.Uss.PersistenceEngine.Contracts.Instrumentation.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.PersistentDescriptors.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Serializer\bin\Debug\Evaluant.Uss.Serializer.dll" "P:\Developpement\euss\Dev\Evaluant.Uss.Commands\bin\Debug\Evaluant.Uss.Utility.dll"" exited with code -1073741701.
如果我複製粘貼這個命令(沒有周圍的引號),它的工作原理。
它是一個.NET2或.Net 4構建?它可能是一個資源問題? – rene 2012-03-03 12:01:34
.NET 2,和我在這個解決方案 – 2012-03-03 20:06:42
FWIW,-1073741701,即任何項目沒有資源'0xC000007B'是代碼'STATUS_INVALID_IMAGE_FORMAT'。你能從'AfterBuild'和命令行中發佈你使用的命令行嗎?你確定你使用了兩個相同的輸入文件嗎? – 2012-03-06 08:31:54