退出我有,我在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