Title: Validation of build files in VS.NET
Hi Gerrod,
Save the XSD from the webpage into this folder:
    C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml 
This is the secret place where VS.NET looks for schemas.
 
Then open an XML file in the VS editor, and click inside it. Go to the Properties window, and set targetSchema using the dropdown to the nant schema, which it will now find. (This just puts in the correct xmlns attribute.) Then validation and intellisense should work fine.
 
The XML editing experience is still sometimes a bit quirky. In VS Whidbey (the next version), the XML editor is being rewritten from scratch and is greatly improved - and hopefully it will be easier to associate a schema with your document as well.
 
Do ping me if you still have problems.
 
Dan -- msbuild team -- danmose[at]microsoft.com
 

"This posting is provided "AS IS" with no warranties, and confers no rights." :-)
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerrod Thomas
Sent: Monday, December 01, 2003 6:34 PM
To: '[EMAIL PROTECTED]'
Subject: [Nant-users] Validation of build files in VS.NET

Hi everyone,

I'm trying to get VS.NET to use the NAnt schema for validation of my build files, but I can't seem to get it to work. I've searched around but haven't found a solution that works, so I'm hoping someone out there has had the same problem and managed to fix it.

I've tried a number of things but I figured that the best one would be to declare my build file as follows -

        <?xml version="1.0"?>
        <project xmlns="http://nant.sourceforge.net/schema/nant-current.xsd" name="UBO" default="compile">
                ....
        </project>

Unfortunately I don't get IntelliSense. Also when I ask VS to validate my build file I get the error:

        Visual Studio could not locate a schema for this document. Validation can only ensure this is
        a well formed XML document and cannot validate the data against a schema.

Does anyone have a solution for this?

Thanks,
Gerrod

PS - please reply direct to me as subscribing to the list just times out :-(


RECIPIENTS ARE REMINDED THAT THIS E-MAIL MESSAGE
IS STRICTLY CONFIDENTIAL AND INTENDED ONLY FOR USE
BY THE ADDRESSEE UNLESS OTHERWISE INDICATED.

Investment Data Technologies Pty Ltd advise that they:
- accept no liability for any abusive, defamatory, obscene, illegal, or
offensive material contained in this e-mail message
- do not monitor the content of any e-mail messages sent from
Investment Data Technologies
- do not authorise or condone the sending of abusive, defamatory,
obscene, illegal, or offensive material by their employees and contractors
- cannot guarantee that this e-mail message is secure and will not be
intercepted by a third party.


Reply via email to