Friday, March 21, 2008

How to fix NAntAddin to run with Visual Studio 2008

I can install NAntAddin v1.0.3 for Visual Studio 2005, and it's OK, at office, I only need to use Visual Studio 2005. But it's really annoying when I cannot install it for Visual Studio 2008 at home.

Play with NAntAddin.AddIn I found that I can fix it to install NAntAddin for Visual Studio 2008. And if you want, you can do it easily. Just open NAntAddin.AddIn in a text edtior, you will find this XML fragment:
<Name>Microsoft Visual Studio</Name>
then just replace "8.0" by "9.0" and restart your Visual Stusio 2008, NAntAddin will start. (Of course, you need to configure NAntAddin in your Visual Stusio 2008 first via Tools|Options...|Environment|Add-in/Macro Security)

Another information relates with NAnt: If you want to get NAnt intellisense in Visual Studio, just copy nant.xsd from NAnt to [VS_HOME]\Xml\Schemas. VS_HOME is the path to Visual Studio folder, in case of Visual Studio 2008, it is "C:\Program Files\Microsoft Visual Studio 9.0" and add a custom namespace to your build file as below
    <?xml version="1.0" encoding="utf-8" ?>
<project name="NAnt Build Sample"


No comments: