2

I'm using Visual Studio 2017 Community on a Windows 10 box.

When I add a .net standard library (just the default code) to my solution the solution builds just fine in Visual studio 2017.

But when I try to build the solution using &'C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe' C:_Sources\MySolution\MyProject\MyProject.csproj

I get a build error:

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

It looks similar to this bugreport but I'm on windows so this does not seem to apply to me.

the csproj file contents:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard1.4</TargetFramework>
  </PropertyGroup>
</Project>

I tried upgrading it to netstandard1.6 but that didn't help either.

Sjors Miltenburg
  • 2,540
  • 4
  • 33
  • 60

1 Answers1

3

I found out I was using the wrong msbuild version.

The msbuild file resides in a different location now with vs2017

How do I call Visual Studio 2017 RC's version of MSBuild from a BAT file?

Community
  • 1
  • 1
Sjors Miltenburg
  • 2,540
  • 4
  • 33
  • 60