1
votes

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">
2
Can you provide the contents of the project file, sanitized as necessary? Also, perhaps detailed/verbose output from grunt (in case we can glean from it sanity checks such as which MSBuild assembly is being used and which project file it is attempting to build).weir
just updated original post with requested dataIsmail
Did you get a fix for this Ismail? I am getting the same error on Azure continuous deploymentBurt
see my answer belowIsmail

2 Answers

1
votes

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

0
votes

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