【发布时间】:2010-05-12 15:10:22
【问题描述】:
这就是我的 .csproj AfterBuild 的样子:
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'">
<Exec Command=""..\Tools\ILMerge\ILMerge.exe" /internalize /ndebug /out:@(MainAssembly) /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 "@(IntermediateAssembly)" @(ReferenceCopyLocalPaths->'"%(FullPath)"', ' ')" Condition=" '$(TargetFrameworkVersion)' == 'v4.0'" />
</Target>
我正在运行 64 位 Windows。我尝试将 .NET Framework 从 ...\Microsoft.NET\Framework\... 更改为 ...\Microsoft.NET\Framework64\...,但没有帮助。
我还在 ILMerge 目录中创建了 ILMerge.exe.config:
<?xml version ="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
</startup>
</configuration>
为什么 ILMerge 不生成 4.0.30319 程序集?
【问题讨论】:
-
你使用的是什么版本的 ilmerge?
-
我尝试了 5 月 26 日 2.10.0526 发布的更新版本(因为有人问了这个问题),但我仍然遇到同样的问题。
-
这似乎是 ILMerge 中的一个错误,它会生成 .Net 4.0 Beta2 的运行时版本。我知道这确实无济于事,但您可以联系 Microsoft 的 Mike Barnett(他的电子邮件位于 ILMerge 下载页面)抱歉
-
我几天前就此事联系过他,所以他知道了。