简体   繁体   English

将Visual Studio VSPackage移植到SSMS 2012或2014

[英]Porting Visual Studio VSPackage to SSMS 2012 or 2014

I recently discovered an extension for visual studio that allows you to specify a watermark for the code window. 我最近发现了Visual Studio的扩展程序,该扩展程序允许您为代码窗口指定水印。 This extension can be found on github here. 这个扩展可以在github上找到。

https://github.com/nategreenwood/VSEditorBackgroundChangerExtension https://github.com/nategreenwood/VSEditorBackgroundChangerExtension

As part of a small project I am attempting to get it to work on SQL Server Management Studio. 作为一个小项目的一部分,我试图使其在SQL Server Management Studio上运行。 While Microsoft doesn't officially support extending SSMS - they also do not discourage it. 尽管Microsoft不正式支持扩展SSMS,但他们也不劝阻它。 Those are their words, not mine. 那是他们的话,不是我的。

Looking into the extension\\application sub folder under SSMS for SQL Server 2014 it is obvious that Microsoft uses VSPackage to include their own extensions to the Isolated Shell version of Visual Studio that SSMS is built on top of. 查看SQL Server 2014的SSMS下的extension \\ application子文件夹,很明显,Microsoft使用VSPackage将自己的扩展包括到Visual Studio的绝缘外壳版本中,SSMS建立在该外壳上。 The manifests appear to be version 1 manifests however. 清单似乎是版本1清单。

These show up in the following location on my own box: C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\ManagementStudio\\Extensions\\Application 这些显示在我自己的框上的以下位置:C:\\ Program Files(x86)\\ Microsoft SQL Server \\ 120 \\ Tools \\ Binn \\ ManagementStudio \\ Extensions \\ Application

Looking for assistance in verifying if this extension can be modified to work with SSMS. 在验证是否可以修改此扩展名以使其与SSMS一起使用时寻求帮助。 I have modified the package manifest in a variety of ways - including rewriting the package as a version one style package and manifest. 我已经以多种方式修改了程序包清单-包括将程序包改写为一种样式的程序包和清单。 I can see the package registered under the pkgdef guid that VSIX generates. 我可以看到在VSIX生成的pkgdef guid下注册了该软件包。 It says it has been installed. 它说它已经安装了。 No error messages are thrown, but no image appears either. 没有引发错误消息,但也没有图像出现。

Does the Isolated Shell and more specifically, the code window utilized by SSMS to develop and execute TSQL support adornments such as the ones used by this package? 孤立外壳程序,更具体地说,SSMS用于开发和执行TSQL的代码窗口是否支持装饰(例如此包使用的装饰)? Does SSMS support version 2 manifests and VSPackages? SSMS是否支持版本2清单和VSPackages?

Any advice on how to modify this package to get it to work is appreciated. 任何有关如何修改此程序包以使其正常工作的建议都值得赞赏。

My own attempts are further documented here: http://sqljudo.wordpress.com/31-days-of-ssms/ssms-day-30-vspackage-and-ssms/ 我自己的尝试在此处进一步记录: http : //sqljudo.wordpress.com/31-days-of-ssms/ssms-day-30-vspackage-and-ssms/

Looks like there was an official Connect answer on this: https://connect.microsoft.com/SQLServer/Feedback/Details/2602390 似乎对此有一个官方的Connect答案: https : //connect.microsoft.com/SQLServer/Feedback/Details/2602390

In 2012 and 2014 the old "Addin" mechanism needs to be used, and as of 2016 (general release) the new "VSPackage" mechanism needs to be used (ref: http://blogs.sqlsentry.com/aaronbertrand/plan-explorer-add-in-ssms-2016/ ) 在2012年和2014年,需要使用旧的“ Addin”机制,从2016年(一般发行版)开始,需要使用新的“ VSPackage”机制(参考: http : //blogs.sqlsentry.com/aaronbertrand/plan- explorer-add-in-ssms-2016 /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM