asp.net - 当还安装了 NETFX 4.6.1 工具时,如何配置 Visual Studio 以使用 NETFX 4.7 工具

标签 asp.net .net visual-studio

从 Visual Studio 2017 15.2 发布 WebApp 期间合并仍在使用版本 4.6.1 中的 asp_net.merge.exe(根据发布输出日志),与安装的 .Net Framework 版本 4.7 不对应。 Framework 4.7版本被设置为项目的目标框架。

两个合并工具都已安装:

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\aspnet_merge.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7 Tools\aspnet_merge.exe

如何配置 Visual Studio 以开始使用 4.7 版本的 aspnet_merge.exe?

最佳答案

我有同样的错误,我使用的是 Visual Studio 2017 (15.9.5),需要针对 .net 4.7.2 进行编译;经过多次测试,这适用于我的:

  1. 安装 latest Windows 10 SDK
  2. 安装 .net 4.7.2 Developer Pack
  3. 将 Visual Studio 安装程序配置为以 .net 4.7.2 SDK 为目标
  4. 直接在[projectname].csproj文件中指定SDK编辑路径,添加:

<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools</TargetFrameworkSDKToolsDirectory>

关于asp.net - 当还安装了 NETFX 4.6.1 工具时,如何配置 Visual Studio 以使用 NETFX 4.7 工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45083234/

相关文章:

c# - 迭代 T4 脚手架中的 [ComplexType] 属性?

Jquery Click 事件在 UpdatePanel 中第二次不触发

c# - .NET 的一次写入经常读取的分布式文件存储?

c# - .NET : How to find the source code for a line of code using the exe and pdb file

.net - 如何跨多个 Visual Studio 项目实现每个项目的 appSettings 和全局 appSettings?

asp.net - node.js 与 asp.net 异步页面

c# - 脚本不在代码后面工作

javascript - "the remote procedure call failed"- 仅限 IE

visual-studio - Visual Studio 2008 将解决方案文件标记为版本 10.00

c++ - 如何在 CMake 项目中包含 IntelliSense 的外部库源?