让VS2008支持PInvoke.net插件

PInvoke.net add-in support for Visual Studio 2008

Category: How do I?
Date: 19 Nov 2008
Product: PInvoke
PInvoke.NET's add-in is written for Visual Studio 2005, but can also be added to Visual Studio 2008, by making a small modification to the configuration file.

First, locate the PInvokeDotNetAddIn.Addin file located in %programfiles%\red gate\PInvoke.NET, open it with a text editor such as notepad.exe, and make the following changes:

After the text:
---------------------------------------------
<HostApplication>
<Name>Microsoft Visual Studio Macros</Name>
<Version>8.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>8.0</Version>
</HostApplication>

----------------------------------------------
Add:
----------------------------------------------
<HostApplication>
<Name>Microsoft Visual Studio Macros</Name>
<Version>9.0</Version>
</HostApplication>
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>9.0</Version>
</HostApplication>

and save the file.

It may also be necessary to add the path to the PInvoke add-in to the list of folders where Visual Studio will look for add-ins. From Visual Studio 2008's Tools menu, select Options, then Add-in/Macro security. If the path to the PInvoke.NET installation folder (c:\program files\red gate\PInvoke.NET) is not listed in the collection of add-in file paths, click the add button and select the installation folder.

After restarting Visual Studio 2008, the add-in will function as it does in previous versions of Visual Studio.

 

posted on 2009-10-26 13:57  jdmei520  阅读(607)  评论(0编辑  收藏  举报

导航