Question

In TFS 2008, I am trying to modify a build script (TFSBuild.proj). I get the following warning:

The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'TeamProject' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.

Which is correct, The element PropertyGroup does indeed have a child called TeamProject.

I’m making an assumption that this is caused because of the following line:

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

The Xml Namespace doesn’t appear to exist as far as I can tell, although it looks like a standard one. Please can anyone tell me if this is a standard XML namespace, how or where I can view its contents and whether the warning that I am seeing may be caused by it?

Was it helpful?

Solution

The answer to your question can be found at this link, and to summarise:

You can safely ignore this warning. So does MSBuild validate your project files against the schema? Yes it does, but I wasn't sure just how it was accomplished, so I fired off an email to Buck Hodges. He was nice enough to pass it by an as-yet-unnamed-dev on the MSBuild team. The dev stated that

"...MSBuild does try to validate against the schema. However, the validation is done at runtime by our code rather than loading the [project] file using a validate reader with the xsd (mainly for perf reasons). MSBuild should fail any projects which don't adhere to the schema."

OTHER TIPS

You're editing A SCRIPT file in Visual Studio editor, it will always try to find missing elements in the namespaces. I have the same "infos" (not errors) when I'm using custom tasks or custom libraries. The best way to solve it is to get used to it:). Remember these are only warnings from the editor.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top