Edit

Share via


MSB4041 diagnostic code

This article describes the MSB4041 error code.

Message text

MSB4041: The default XML namespace of the project must be the MSBuild XML namespace or no namespace. If the project is authored in the MSBuild 2003 format, please add xmlns='value' to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

Remarks

This error is caused by an incorrect xmlns value in a project file. The xmlns attribute appears in older project files; it's no longer required. However, if it's present, it must be exactly as follows:

xmlns="http://schemas.microsoft.com/developer/msbuild/2003'

Try deleting the xmlns attribute. Since the attribute is no longer required, deleting it should solve this issue.

Applies to

All versions of MSBuild