.net 标准库的 msbuild builderror
msbuild builderror for .net standard library
我在 Windows 10 盒子上使用 Visual Studio 2017 社区。
当我将 .net 标准库(只是默认代码)添加到我的解决方案时,该解决方案在 Visual studio 2017 年构建得很好。
但是当我尝试使用构建解决方案时
&'C:\Program Files (x86)\MSBuild.0\Bin\msbuild.exe' C:_Sources\MySolution\MyProject\MyProject.csproj
我遇到构建错误:
error MSB4041: The default XML namespace of the project must be the
MSBuild XML namespace. If t he project is authored in the MSBuild 2003
format, please add
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the
element. If the pro ject has been authored in the old 1.0 or
1.2 format, please convert it to MSBuild 2003 format
它看起来与 this bugreport 相似,但我在 windows 所以这似乎不适用于我。
csproj 文件内容:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>
</Project>
我尝试将它升级到 netstandard1.6,但这也没有帮助。
我发现我使用了错误的 msbuild 版本。
msbuild 文件现在与 vs2017 位于不同的位置
我在 Windows 10 盒子上使用 Visual Studio 2017 社区。
当我将 .net 标准库(只是默认代码)添加到我的解决方案时,该解决方案在 Visual studio 2017 年构建得很好。
但是当我尝试使用构建解决方案时 &'C:\Program Files (x86)\MSBuild.0\Bin\msbuild.exe' C:_Sources\MySolution\MyProject\MyProject.csproj
我遇到构建错误:
error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If t he project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the pro ject has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format
它看起来与 this bugreport 相似,但我在 windows 所以这似乎不适用于我。
csproj 文件内容:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>
</Project>
我尝试将它升级到 netstandard1.6,但这也没有帮助。
我发现我使用了错误的 msbuild 版本。
msbuild 文件现在与 vs2017 位于不同的位置