MSBuild frustration.

J

Jianwei Sun

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'.
C:\Development\DTMap\DTMapMSBuild.proj


Is there any workaround to turn off the schema validation while keep the
intellisense available.

Thanks,
Jianwei
 
G

Guest

You can modify the xsd file that drives this intellisense, its named
Microsoft.Build.xsd. There should be two of these files on your computer one
in the .NET Framework directory, and one in
%Microsoft Visual Studio 8%/Xml/Schemas/1033
The one used for intellisense should be the one in the VS directory. If you
add it to that file then you should get the Intellisense help you to create
the Test element under PropertyGroup. But I think the more important one for
you is the one in the .NET Framework directory, because this should be the
one that drives those warnings. I'm not 100% sure of that though.

Sayed Ibrahim Hashimi
www.sedodream.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top