在多台机器上开发时无法运行VSPackage [英] Cannot run VSPackage when developing on multiple machines
问题描述
我们正在使用Visual Studio 2012和TFS在团队中开发VSPackage.
We are working on a VSPackage in a team, using Visual Studio 2012 and TFS.
该扩展名可以在用于创建扩展名的计算机上正常运行(通过向导).在另一台计算机上,Visual Studio说当我们尝试运行它(使用 F5 )时,无法直接启动具有类库输出类型的项目".
The extension works fine on the computer used to create it (through a wizard). On another computer, Visual Studio says that "a project with output type of class library cannot be started directly" when we attempt to run it (with F5).
该项目的输出确实是类库,并且在第一台计算机上按 F5 会启动扩展已加载并正常工作的Visual Studio实验实例.
The output of the project is indeed class library, and pressing F5 on the first machine starts Experimental Instance of Visual Studio with the extension loaded and working.
通过在第二台计算机上查看%LOCALAPPDATA%\Microsoft\VisualStudio\11.0Exp\Extensions
,我们看到该扩展名已构建,并且尝试在VS中进行注册.
我们还在第二台计算机上创建了另一个扩展,并尝试在第一台计算机上运行它.它显示相同的错误.
By looking at %LOCALAPPDATA%\Microsoft\VisualStudio\11.0Exp\Extensions
on the second computer, we see that the extension had been built and there was an attempt of registering it with VS.
We have also created another extension on the second computer and tried to run it on the first machine. It displays the same error.
我们如何才能使该扩展程序在未用于创建该扩展程序的计算机上运行?
How can we get the extension to run on computers which were not used to create it?
推荐答案
Visual Studio包项目类型向名为VISX
的项目属性视图添加了一个附加选项卡.在该选项卡上,默认情况下选中Deploy VSIX content to experimental instance for debugging
选项.这就是在构建后将包文件复制到当前用户配置文件的扩展目录的原因.
The Visual Studio package project type adds an additional tab to the project properties view named VISX
. On that tab the Deploy VSIX content to experimental instance for debugging
option is checked by default; that´s the reason why package files are copied to the extensions directory of the current user´s profile after build.
如果要使用实验性配置单元启动Visual Studio,则必须自定义类库项目的Debug
设置.将Start Action
设置为Start external program
并选择devenv.exe
文件(该文件的位置取决于您的安装文件夹)并指定以下命令行参数:
If you want to start Visual Studio using the experimental hive you must customize the Debug
settings of the class library project. Set the Start Action
to Start external program
and select the devenv.exe
file (the file´s location depends on your installation folder) and specify the following commandline arguments:
/rootSuffix Exp
这允许通过按 F5 调试扩展名.
This allows to debug the extension by pressing F5.
这篇关于在多台机器上开发时无法运行VSPackage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!