Mage.exe没有';无法为4.5生成兼容的Frameworks

本文关键字:5生 Frameworks 没有 exe Mage | 更新日期: 2023-09-27 18:00:44

我尝试使用mage.exe(位于"C:''Program Files(x86)''Microsoft SDKs''Windows''v8.1A''bin''NETFX 4.5.1 Tools''mage.exe"中)从应用程序目标.Net 4.5中生成点击一次文件。练习很好,但在*.application文件中有一个部分"compatibleFrameworks":

  <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
    <framework targetVersion="4.0" profile="Client" supportedRuntime="4.0.30319" />
    <framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
  </compatibleFrameworks>

我不知道为什么框架设置为4.0。我想最终在生成的文件中获得.Net 4.5,所以像这样的东西:

<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
    <framework targetVersion="4.5" profile="Full" supportedRuntime="4.0.30319" />
  </compatibleFrameworks>

我应该更改什么?为什么merge.exe没有在兼容的框架上设置正确的版本?我不想手动修改。

Mage.exe没有';无法为4.5生成兼容的Frameworks

兼容的框架版本根据使用的Mage版本而有所不同。我不知道有任何版本的法师将目标版本设置为4.5。Mage不是一个完整的工具,微软建议您使用文本编辑器手动执行各种更改。我正在使用Powershell编辑我的清单后,创建了他们与法师。您可能可以手动将targetVersion属性更改为4.5,然后重新签署清单。

Mage 3.5.30729.1

C: ''Program Files(x86)''Microsoft SDK ''Windows''v10.0A''bin''NETFX 4.6.1 Tools''mage.exe

文件中没有兼容的Frameworks元素

法师4.0.30319.18020

C: ''Program Files(x86)''Microsoft SDK ''Windows''v8.0A''bin''NETFX 4.0 Tools''mage.exe

<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
  <framework targetVersion="4.0" profile="Client" supportedRuntime="4.0.30319" />
  <framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>

法师4.0.30319.33440

C: ''Program Files(x86)''Microsoft SDK ''Windows''v8.1A''bin''NETFX 4.5.1 Tools''mage.exe

<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
  <framework targetVersion="4.0" profile="Client" supportedRuntime="4.0.30319" />
  <framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>

法师4.6.81.0

C: ''Program Files(x86)''Microsoft SDK ''Windows''v10.0A''bin''NETFX 4.6 Tools''mage.exe

<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
  <framework targetVersion="4.6" profile="Client" supportedRuntime="4.0.30319" />
  <framework targetVersion="4.6" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>

Mage 4.6.1055.0

C: ''Program Files(x86)''Microsoft SDK ''Windows''v10.0A''bin''NETFX 4.6.1 Tools''mage.exe

<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
  <framework targetVersion="4.6" profile="Client" supportedRuntime="4.0.30319" />
  <framework targetVersion="4.6" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>