项目是可以运行的,但是发布时,就报“Can't find the valid AspnetMergePath”问题

1、问题截图

vs2015 发布项目时,报“Can't find the valid AspnetMergePath”错误,如何解决
    




Can't find the valid AspnetMergePath”问题

 

2、解决方法

1)找到引起报错的文件路径

如:我这边是:C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets

2)打开改文件,搜索TargetFrameworkSDKToolsDirectory

打开该文件,按ctrl+F ,打开搜索,输入TargetFrameworkSDKToolsDirectory

vs2015 发布项目时,报“Can't find the valid AspnetMergePath”错误,如何解决
    




Can't find the valid AspnetMergePath”问题

 

 3)在PropertyGroup标签下,加入

<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\</TargetFrameworkSDKToolsDirectory>

效果如下:

vs2015 发布项目时,报“Can't find the valid AspnetMergePath”错误,如何解决
    




Can't find the valid AspnetMergePath”问题

 4)保存文件

 3、重新发布项目

vs2015 发布项目时,报“Can't find the valid AspnetMergePath”错误,如何解决
    




Can't find the valid AspnetMergePath”问题

 

 

参考网址:

https://cloud.tencent.com/developer/ask/89517

 

相关文章:

  • 2022-12-23
  • 2022-01-16
  • 2021-12-15
  • 2021-05-11
  • 2022-12-23
  • 2021-09-15
  • 2021-08-01
  • 2021-07-04
猜你喜欢
  • 2021-12-05
  • 2021-07-07
  • 2022-12-23
  • 2021-06-29
  • 2021-07-31
  • 2021-09-16
  • 2021-03-29
相关资源
相似解决方案