MSB4066 diagnostic code
This article describes the MSB4066 error code.
Message text
MSB4066: The attribute 'value' in element 'value' is unrecognized.
Remarks
This error occurs when MSBuild encounters an XML attribute in a project file or target file that it doesn't recognize. MSBuild validates the attributes of elements in project files to ensure they adhere to the correct MSBuild syntax and supported attributes for each element.
Possible causes
The error is typically caused by one of the following:
- A typo in an attribute name within an MSBuild project file (for example,
.csproj
,.vbproj
, or.proj
). - Use of an unsupported or obsolete attribute in a project file.
- An attribute was added to the project file but isn't recognized by your version of MSBuild.
Resolution
- Check for typos: Verify that the attribute name is spelled correctly and matches the expected schema.
- Remove unsupported attributes: Cross-reference the MSBuild documentation to ensure that the attribute is valid for the specific element. See MSBuild project file schema reference.
- Update MSBuild version: If the attribute is new and not recognized, ensure you're using a version of MSBuild that supports it.
Applies to
All versions of MSBuild