发布:2020/8/20 11:26:23作者:管理员 来源:本站 浏览次数:1263
用VS2017打开一个以前用VS2010写的asp.net项目,发布的时候报错如图:
解决方法:
将原来项目中下方部分内容
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
替换为
-
<PropertyGroup>
-
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
-
</PropertyGroup>
-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
-
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
© Copyright 2014 - 2025 柏港建站平台 ejk5.com. 渝ICP备16000791号-4