在 windows 上部署 VS2010 Extension (VSIX) 并注册新的文件扩展名 [英] Deploy VS2010 Extension (VSIX) and register new file extension on windows

查看:64
本文介绍了在 windows 上部署 VS2010 Extension (VSIX) 并注册新的文件扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 VS2010 扩展来管理一种新型项目.我已经创建了包含项目和项目模板的 VSIX 文件,一切正常,我可以创建一个新项目、语法高亮显示、编译它等.

I've created a VS2010 extension to manage a new type of project. I've created the VSIX file with the project and item templates inside, and everything works fine, i'm able to create a new project, syntax highlight, compile it, etc.

我现在想做的是将我的文件 (.stadyn) 关联到 VS2010,就像一个 .cs 文件.我的意思是,给它一个图标并双击打开 VS2010.

What i want to do now is to associate my files (.stadyn) to the VS2010, like a .cs file. I mean, give it an icon and open the VS2010 on a double-click.

有人知道如何部署扩展并将这些键添加到 Windows 注册表中吗?

Does anybody know how to deploy the extension and add those keys to windows registry?

提前致谢.

推荐答案

你必须有各种可能性.

  1. 为您的扩展程序创建一个安装程序,它可以完成所有工作.
  2. 在扩展首次启动时添加文件关联.

我更喜欢选项一,从那时起您还可以卸载扩展程序并取消注册文件关联,并且可以执行其他清理工作.你也可以在安装过程中做其他事情.

I would prefer option one, since then you can also uninstall your extension and unregister the file associations and may be do other cleanup stuff. Also you could do other stuff during the install.

部署记录在 MSDN 中:
http://msdn.microsoft.com/en-us/library/ff363239.aspx

Deployment is documented in the MSDN:
http://msdn.microsoft.com/en-us/library/ff363239.aspx

这篇关于在 windows 上部署 VS2010 Extension (VSIX) 并注册新的文件扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆