Azure-pipelines-tasks: ASP.NET Core 1.1 - Error MSB4041

Created on 7 Mar 2017  路  19Comments  路  Source: microsoft/azure-pipelines-tasks

Build error with project.json not found.

Most helpful comment

I changed the agent "Hosted VS2017" inside VSTS. And it worked!
hosted vs2017

All 19 comments

Why closed issue #3311?

@aciechomski #3311 Seems to be about *.csproj and not project.json

In VS 2017 project.json is depreciated and csproj doesn't work

csproj does work. could you please provide muc more information?
dotnet --info to get started and what error message you get?

Error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
obraz

I have exactly the same problem as aciechomski. VSTS throws the above error for ASPNET Core project

Both are the same issue. The hosted image doesn't have VS2017 yet. Read my last comment in #3311

You can create a private agent if you're blocked (on azure VM)

@bryanmacfarlane I'm seeing this same behavior running MsBuild in a jenkins script. The build works fine locally in VS2017. Will there be a new BuildTools release which supports VS2017/dotnetcore incoming soon? (Sorry that this isn't a VSTS specific issue; please feel free to point me at the appropriate GitHub repo.)

When is the hosted image going to get VS2017?? This is big drawback in using VS Team Services.. they should be coming out BEFORE everyone else gets it.

It's there. Read the link above. It shows up as the "hosted vs2017" queue in your definitions queue picker

Also note this is not a limitation of the vsts build system. You could hook up any agent on any vm with any tool sets you want.

It is a limitation of the convenience hosted pool machines. But as I outlined in that link we are improving that with multiple hosted images via multiple queues so we can get images with preview tools earlier.

Unfortunately that is not working.. that host fails at the Build step for me, which is just a VS2017 build of the SLN.

Same issue here, but can't find a workaround at the moment.
Started a new WebAPI project in VS2017 - and got the issue:

The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format

Same issue here!

I have the same problem on a private agent when building a netstandard1.5 csproj project.
The build machine has VS2017 installed.

I changed the agent "Hosted VS2017" inside VSTS. And it worked!
hosted vs2017

I'm also getting the same error in VS2017 using wix 311

Windows Installer XML Toolset Toolset Harvester version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

heat.exe(0,0): error HEAT5305: Failed to load project xxx.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

Done building project "xxx.wixproj" -- FAILED.

I am having same issue, however I am using Bamboo for deployment activities and not Team Foundation.

I was having this error message while trying to automate build and tests in Appveyor. I could not find so many articles on internet as I would like to. But I managed to fix this Error MSB4041 after reading this post. I had to export site a yaml file at Appveyor, then after tweeking locally this yaml file with image: Visual Studio 2017, I have uploaded it to Github again. Now the automated build and tests are working with dotnet core (.NETCoreApp 1.1):

version: 1.0.{build}
image: Visual Studio 2017
#dotnet_csproj:
  #patch: true
  #file: '**\*.csproj'
  #version: '{version}'
  #package_version: '{version}'

before_build:
- cmd: >-
    dotnet restore

    nuget restore

build:
  publish_nuget: true
  publish_nuget_symbols: true
  include_nuget_references: true
  verbosity: minimal

test_script:
- cmd: dotnet test ./SOLIDPrinciples.XUnitTest/SOLIDPrinciples.XUnitTest.csproj

after_build:
- cmd: dotnet pack ./SOLIDPrinciplesAsyncWebApi/SOLIDPrinciplesAsyncWebApi.csproj --configuration Release

artifacts:
- path: '**/*.nupkg'

attempting to build a barebones .net core console project with jenkins and getting this:

The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format

Was this page helpful?
0 / 5 - 0 ratings