I am trying to edit an MSBuild project file in the Visual Studio 2005. I
tried to use the Intellisense of the editor, so I reference the xmlns
at the first line like this:
<Project DefaultTargets="DDTI.Utilities.Clean"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
When I define some custome property like this in the build file .
<PropertyGroup Condition="'$(CompileConfig)' == 'DEBUG'" >
<Test></Test>
</PropertyGroup>
It keeps giving me the following message, it's kind of annoying.
Warning 3 The element 'PropertyGroup' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child
element 'Test' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible
elements expected: 'Property' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'.
Is there any workaround to turn off the schema validation while keep the
intellisense available.
Thanks,
Jianwei
Tejal [MSFT] - 17 Feb 2006 01:01 GMT
There is no direct way to turn off validation. If you selected "Project"
element and chose "Goto definition", the editor will open the schema
definition for Project.
I am not sure why you would bind to a schema and still want to generate
content that does not validate as per the schema.
Note that while I don't recommend this, you could modify the "Project"
definition to allow "any" content. If you modify Microsoft.Build.Core.xsd but
don't SAVE the file, the editor will work with the modified schema open in VS
and not report errors. Once you close the schema without modification, the
editor will use the old schema cache version and the errors will show up
again.
> I am trying to edit an MSBuild project file in the Visual Studio 2005. I
> tried to use the Intellisense of the editor, so I reference the xmlns
[quoted text clipped - 23 lines]
> Thanks,
> Jianwei