2

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">
4
  • 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
    Jun 3, 2019 at 12:56
  • 1
    just updated original post with requested data
    – Ismail
    Jun 3, 2019 at 13:12
  • Did you get a fix for this Ismail? I am getting the same error on Azure continuous deployment
    – Burt
    Oct 10, 2019 at 21:11
  • see my answer below
    – Ismail
    Oct 11, 2019 at 10:01

2 Answers 2

1

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.