Developing multiple Visual Studio 2010 extensions

浪尽此生 提交于 2020-01-03 19:42:06

问题


Im working on a couple of independent Visual Studio extensions in separate solutions. When I open one of them and launch the experimental instance in the debugger, the other extensions from the other solutions (which aren't open) are loaded as well. There must be a way to only launch one extension in the experimental instance at a time (in particular the one you're currently working on), right?


回答1:


Not really. When you build and run the extension project in VS, it is actually deployed to the experimental instance of VS, but they're not uninstalled when you finish debugging/running.

Your best bet is to use the script to reset the experiment instance that is provided with the VS SDK. Unfortunately you'll have to do this every time you switch between your solutions.

Look in the start menu for:

Microsoft Visual Studio 2010 SDK\Tools\Reset the Microsoft Visual Studio 2010 Experimental instance.lnk




回答2:


You can actually create as many experimental instances as you like by using different, arbitrary values of the "RootSuffix" parameter (which will create multiple separate base keys in the registry) but I'm not sure how easy it is to configure VSSDK projects (such as VsPackage ones) to publish to a different VS hive. Probably just a property you set inside each project file. Each experimental instance is completely separate.

So you can run "devenv.exe /RootSuffix MyFirstInstance" and "devenv.exe /RootSuffix MySecondInstance" and each will use separate sets of user extensions. This would result in using the registry keys HKCU\Software\Microsoft\VisualStudio\10.0MyFirstInstance_Config and HKCU\Software\Microsoft\VisualStudio\10.0MySecondInstance_Config, respectively.

They seem to have removed a lot of the documentation for this feature since VS2005, but it all still seems to work.



来源:https://stackoverflow.com/questions/7294995/developing-multiple-visual-studio-2010-extensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!