如何向 IronPython Studio 添加新的项目类型?
我正在尝试遵循本教程 ,但仅描述了如何基于C#添加新的项目类型。我想在 IronPython 下创建一个新的项目(子)类型。
我已经下载了 IronPython 源代码,我想我已经找到了需要添加新模板的地方,但我不知道如何“运行”它。 VS 告诉我无法运行该项目,因为它是一个类。当遵循上述教程时,它实际上确实让您运行它,它只是启动 VS 的测试实例。那么我该如何测试我的新 IronPython 模板呢?当我构建它时,它会创建一个 dll
和一个 vsix
文件,但我不知道如何处理它们。
我可以将 template.zip
文件复制到我的 VS ProjectTemplates 文件夹中,这样就可以了,但是我需要添加一些比模板更多的功能,这就是我尝试创建 VSPackage 的原因。 IronPython 源代码做到了这一点,但我只需要找到正确的方法来扩展它。
另外,我最好将我的项目与 IronPythonTools 项目解耦,这样我就不必重建整个项目,并且当 IronPythonTools 更新时,我的项目也不会崩溃。一定有某种我可以继承的类吗?
I'm trying to follow this tutorial, but it only describes how to add a new project type based on C#. I want to create a new project (sub)type underneath IronPython.
I've downloaded the IronPython source code, and I think I've found the place where I need to add my new template, but I don't know how to "run" it. VS tells me I can't run the project because it's a class. When following the above tutorial, it actually does let you run it, it just fires up a test instance of VS. So how would I test my new IronPython template? When I build it, it creates a dll
and a vsix
file, but I don't know what to do with them.
I can copy the template.zip
file into my VS ProjectTemplates folder, and that works, but I need to add some more functionality than just a template, which is why I'm trying to create a VSPackage. The IronPython source does this, but I just need to find the proper way to extend it.
Also, I'd preferably like to decouple my project with the IronPythonTools
project so that I don't have to rebuild the whole thing, and when IronPythonTools is updated, my project won't explode. There must be some kind of class I can inherit from instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您构建并获取 VSIX 文件时,您可以使用该文件将包安装到 VS 的普通实例中。您只需双击 .vsix 文件即可获得 VS 扩展安装体验。您还可以将 VSIX 交给其他任何人,他们也可以安装它。
与 IronPython 工具解耦的最简单方法是不链接到它的任何程序集。这可能意味着如果您使用 Ipy Tools 中的任何内容,您需要从头开始创建一些功能。
When you build and get the VSIX file you can use that to install the package into a normal instance of VS. You just need to double click on the .vsix file and you'll get the VS extension installation experience. You can also give the VSIX to anyone else and they can install it as well.
The easiest way to be decoupled from IronPython Tools would be to not link against any of it's assemblies. That might mean you need to create some functionality from scratch if you're using anything that's in Ipy Tools.