我们的 WDP 存在一些问题,它正在部署一个 ASP.NET 4.0 站点。似乎一切正常,但是当它部署时,我们遇到 System.BadImageFormatException: Bad binary signature. (Exception from HRESULT: 0x80131192)
错误,当点击特定页面时,从其他阅读中出现的可能与默认情况下 WDP 使用的 aspnet_merge 版本有关。问题是,我们刚刚更换了所有机器,并且在旧机器上运行良好..
我已经找到了如何指定Microsoft.WebDeployments.Targets
文件中的哪个版本(在此处输入链接描述),但不相信它实际上正在使用它..
<AspnetMergeName>aspnet_merge.exe</AspnetMergeName>
<!-- OLD
<AspnetMergePath>$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v10.0</AspnetMergePath>
<AspnetMergePath Condition="Exists('$(TargetFrameworkSDKDirectoryBin)$(AspnetMergeName)')">$(TargetFrameworkSDKDirectoryBin)</AspnetMergePath>
-->
<AspnetMergePath>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools</AspnetMergePath>
<AspnetMergePath Condition="'$(TargetFrameworkVersion)' == 'v4.0'">C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools</AspnetMergePath>
我从这里得到了路径:http: //msdn.microsoft.com/en-US/library/bb397866.aspx#findingthecorrectversion 有没有办法直接在 wdproj 文件中设置 aspnet_merge 的路径?
这一切都假设这是当然首先是问题..
谢谢
纳特