更新时间:2021-07-13 23:59:57
我遇到了同样的问题,并找到了更简单的解决方案
I had the same issue and find an easier solution
这是由于Vs2012在csproj文件中添加了以下内容:
It is due to Vs2012 adding the following to the csproj file:
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)MicrosoftVisualStudiov$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
您可以安全地移除该部分,您的解决方案就会构建.
You can safely remove that part and your solution will build.
作为 Sielu 指出 你必须确保 .proj 文件开始使用 <Project ToolsVersion="12"
否则下次打开使用 Visual Studio 2010 进行项目,它将再次添加删除的节点.
As Sielu pointed out you have to ensure that the .proj file begin with
<Project ToolsVersion="12"
otherwise the next time you open the project with visual studio 2010, it will add the removed node again.
否则,如果您需要使用 webdeploy 或使用构建服务器,上述解决方案将不起作用,但您可以在构建脚本中指定 VisualStudioVersion
属性:
Otherwise, if you need to use webdeploy or you use a build server, the above solution will not work but you can specify the VisualStudioVersion
property in your build script:
msbuild myproject.csproj /p:VisualStudioVersion=12.0
或编辑您的构建定义:
ASP.Net Core Web API生成错误-MSB4019找不到导入的项目Microsoft.DotNet.Props.确认< Import>中的路径是否正确.
错误MSB4019:导入的项目“C:\ Microsoft.Cpp.Default.props”没找到。确认< I mport>中的路径声明是正确的,并且该文件存在于磁盘上。
npm install -g karma 错误 MSB4019:导入的项目“C:\Microsoft.Cpp.Default.props"没有找到
npm install -g karma 错误 MSB4019:导入的项目“C:Microsoft.Cpp.Default.props"没有找到