我有一个C#项目,我在AfterBuild目标中运行ILMerge。但是,我有一条消息告诉我,我的命令失败并退出代码-1073741701。
对我来说奇怪的是,如果我在命令提示符下运行输出中写入的命令,它就会成功。有什么想法吗?
一个提示:我正在使用ILMerge将为silverlight构建的项目与“经典”.NET项目合并。您可以在http://euss.codeplex.com找到此项目。导致我麻烦的项目是Evaluant.Uss.PersistenceEngine.Contracts
这是我运行的msbuild来创建我的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)"', ' ')" />
它在输出窗口中生成以下内容:
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.
如果我复制粘贴此命令(没有周围的引号),它就可以工作。
答案 0 :(得分:0)
看起来ilmerge不支持在另一个进程中调用: