Ismail
Ismail

Reputation: 993

Error: The default XML namespace of the project must be the MSBuild XML namespace

I using grunt msbuild to build a project. When I run grunt I get the following error:

Error: 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

In the project, it already has this namespace.

The project was authored in vs2019 and .net 4.7.2

The output from grunt looks like:

Running "copy:bacon" (copy) task Created 7 directories, copied 16 files

Running "zip:release" (zip) task File "release/zip/Cogworks.ExamineInspector.1.zip" created.

Running "umbracoPackage:dist" (umbracoPackage) task Package created at release\umbraco\Cogworks.ExamineInspector.1.zip (29082 bytes)

Running "nugetpack:dist" (nugetpack) task Trying to create NuGet package from src/Cogworks.ExamineInspector/Cogworks.ExamineInspector.csproj. ERROR Error: 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. C:\code\examineinspector-v2\src\packages\Umbraco.SqlServerCE.4.0.0.1\build\Umbraco.SqlServerCE.targets Warning: Task "nugetpack:dist" failed. Use --force to continue.

Aborted due to warnings.

And cut down part of project file looks like:

<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

Upvotes: 2

Views: 6916

Answers (2)

Vamprio
Vamprio

Reputation: 1

I just wanted to expand on Ismail's answer.

His solution is correct however if you are wondering on how to add the namespace and get it running the file should look like this:

Solution

Upvotes: 0

Ismail
Ismail

Reputation: 993

Ok figured this out after paying more attention to the error message. In packages\Umbraco.SqlServerCE.4.0.0.1\build\Umbraco.SqlServerCE.targets it needed the namepsace i added it there and now it builds.

Issue now is figuring out how to get updated package for that dependancy

Upvotes: 1

Related Questions