vsix

VSIX: execute code on VS startup

自作多情 提交于 2019-12-22 04:08:12
问题 I'd like to call some code from VSIX extension when visual studio loads a solution, how do I do that? Package::Initialize is called only when user presses a button of my addin first time. 回答1: Try adding the following attribute to your VSPackage class: [ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids80.SolutionExists)] That will trigger your package to load when a solution is opened/created. 回答2: Author asked about VS2010, so it should be: [ProvideAutoLoad(VSConstants

NuGet Package which installs a VSIX

一笑奈何 提交于 2019-12-22 01:15:01
问题 We developed a "Custom Tool" type VSIX Visual Studio Extension in our company. This extension generates C# code from certain xml files. Right now I have a projects which produces the VSIX as the result of the build. Goal: I would like to also wrap this VSIX into a NuGet package, what my fellow developers can install onto their solution. So I'm searching for some kind of Project Template or something for that. Or it is even good if there's something which triggers the process in the existing

Failed to install Visual studio extensions .VSIX

…衆ロ難τιáo~ 提交于 2019-12-21 20:18:50
问题 I'm facing an error while trying to install/update any visual studio extension, I'm running Visual studio 2015 enterprise edition on Windows 7. 12/12/2016 11:35:11 AM - Microsoft VSIX Installer 12/12/2016 11:35:11 AM - ------------------------------------------- 12/12/2016 11:35:11 AM - Initializing Install... 12/12/2016 11:35:11 AM - Extension Details... 12/12/2016 11:35:11 AM - Identifier : EntityFramework_Reverse_POCO_Generator..d542a934-8bd6-4136-b490-5f0049d62033 12/12/2016 11:35:11 AM -

HWnd of Visual Studio 2010

强颜欢笑 提交于 2019-12-21 12:22:34
问题 Is there a way to get the HWnd pointer to the top window of Visual Studio 2010 from a VSIX extension? (I would like to change the title of the window). 回答1: Since there are good chances that your VSIX extension will be running in-process with Visual Studio, you should try this: System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle (Note if you do this too early, you'll get VS Splash screen ...) 回答2: I'm assuming you want to do this programatically in C#? You'll need to define this P

How to create green (or blue) squiggle adornments with a Visual Studio extension

限于喜欢 提交于 2019-12-21 04:07:03
问题 I have a Visual Studio extension that show red error squiggles. I also like to provide squiggles with other colors, for example yellow for warnings. Creating red squiggles can be done by extending the ITagger class, along the lines: internal sealed class MySquigglesTagger : ITagger<IErrorTag> { public IEnumerable<ITagSpan<IErrorTag>> GetTags(NormalizedSnapshotSpanCollection spans) { foreach (IMappingTagSpan<MyTokenTag> myTokenTag in this._aggregator.GetTags(spans)) SnapshotSpan tagSpan =

Update Private Gallery atom such that VS shows that an extension update is available

六月ゝ 毕业季﹏ 提交于 2019-12-20 09:55:47
问题 I'm using a Visual Studio Private Gallery to publish a VSIX internal to my company. My VSIX shows up in the "Online" section of "Extensions and Updates" in Visual Studio 2012 and I can install it from there: However, once it's installed, I can't figure out how to update my extension in a way that makes it show up in the "Updates" section of that same dialog box, nor can I figure out how to make Visual Studio notify me that an update is available. I've tried various combinations of the

How to register my service as a global service or how can I use MEF in my scenario?

筅森魡賤 提交于 2019-12-20 07:33:09
问题 I would like to create my own service with global visibility. To implement that, I followed this sample solution. Everything goes well, I can call my service within a class, which extends from the Package abstract class, in this way: public class ClientPackage : Package { private void GetGlobalServiceCallback(object sender, EventArgs args) { IMyGlobalService service = GetService(typeof(SMyGlobalService)) as IMyGlobalService; } } Because I'm in a Package, I can easily call GetService and I can

Is it possible to have a vs2010 vsix check for updates locally?

一世执手 提交于 2019-12-20 04:31:16
问题 I'm writing a project structure and code analysis extension for visual studio at work. The project can not be published to the Visual Studio Extensions Gallery. Is there any way to manage updates and deployment built in to visual studio so that a team can use the extension and get the update prompts? 回答1: No, this is not a supported operation on Visual Studio 2010. I just verified this with the extension manager team. 回答2: Looks like you can do this now with Private Galleries! 来源: https:/

WPF modal window in Visual Studio Extension blocking input

落爺英雄遲暮 提交于 2019-12-20 04:09:10
问题 Using the following tutorial, within a VSIX project, I created a WPF window that inherits from Microsoft.VisualStudio.PlatformUI.DialogWindow, and I display this modally using the following code: var myWindow = new MyWindow(myParameters); myWindow.ShowDialog(); When I compile this in RELEASE mode and start without debugging [Ctrl+F5], it opens the Experimental version of Visual Studio. Here, I open another Solution and then execute my Modal Window. The window works just fine - I can type in

How can I install a VSIX package automatically, with WIX?

邮差的信 提交于 2019-12-20 03:03:35
问题 I've got a WIX installation project for my application. As part of my solution I have a VSIX extension, that I want to install on the customer's Visual Studio. What I don't know, is how to get WIX to automatically initiate the VSIX importer. I tried following the advice on MSDN (How to: Prepare Extensions for Windows Installer Deployment as well as Installing a VSIX as part of a Larger installation), to no avail. Neither included guidance for WIX projects. Any help will be appreciated. 回答1: