vsix

Detect current VSIX package's version from code

允我心安 提交于 2019-12-19 10:15:12
问题 I am writing a VSIX project and I would like for the code to be able to determine whether an update is available. I know Visual Studio would be able to check for the update, however, I would like for the extension to be able to prompt user (developer) more verbosely. I wonder how could make the extension read its own version from the package manifest? Thank you. 回答1: I found that I could read the version information directly from the manifest XML file. var doc = new XmlDocument(); doc.Load

VSIX Project Context Menu

妖精的绣舞 提交于 2019-12-19 09:26:34
问题 I'm trying to create a Visual Studio 2017 extension, just for fun and to learn how VS extensibility works. My extension must be usable from the Solution Explorer tab as a context menu button, but I would like to include it at a menu level that isn't root. My goal is to put it in the "Add" sub-menu, but at the moment I'm only able to put it at root level (when you right-click the Project item, the menu entry is shown as the last of the context menu control). How can I move it under the "Add"

VS 2013 doesn't see my custom check-in policies

社会主义新天地 提交于 2019-12-19 04:26:32
问题 I have custom check-in policies deploying via VSIX. Now I'm trying to use them in Visual Studio 2013. What I did: I opened my policies in VS 2013. Changed "Install Targets" in vsixmanifest to [10.0, 13.0). Then built project, installed VSIX and opened both VS. VSIX project uses .NET Framework 4.5, policies project uses 4.0. What I have: Last version of my policies in C:\Users\...\AppData\Local\Microsoft\VisualStudio\12.0Exp\Extensions directory Copies of policies for both 2012 and 2013 VS in

How do I programmatically refresh/reload a VS project after modifying the underlying file?

痴心易碎 提交于 2019-12-19 03:23:15
问题 I am developing a Visual Studio package and I have written some code that will make a file in Solution Explorer dependant upon another file. What this means is that it gives them the same relationship as code-behind files or designer files, where they appear nested under the parent file with a plus/minus icon. + MainForm.cs - MainForm.cs MainForm.Designer.cs MainForm.resx The code that I have written successfully and correctly modifies the underlying project file, however the change is not

How to include assemblies from NuGet packages in a VSIX Installer?

耗尽温柔 提交于 2019-12-18 18:55:24
问题 I'm working on creating a Visual Studio 2017 custom Check-In Policy extension. My current solution is structured as follows: Note: I am taking advantage of the new NuGet PackageReference approach, which is why there is no packages.config file. I believe I have setup my VSIX manifest appropriately since everything works perfectly when I don't reference Microsoft.Net.Http (originally I was hard-coding in values instead of retrieving the values). I'm not sure why the Microsoft

How to add context menu entries in website projects?

烂漫一生 提交于 2019-12-18 07:02:35
问题 I'm not able to add context menu entries for website project items. How to reproduce the problem: Create a VS Package project Go to the vsct file and replace the groups section with: <Group guid="guidVSPackage1CmdSet" id="MyMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/> </Group> <Group guid="guidVSPackage1CmdSet" id="MyMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/> </Group> <Group guid="guidVSPackage1CmdSet" id=

Unable to debug VSIX project

与世无争的帅哥 提交于 2019-12-17 19:38:22
问题 I'm trying to develop my first visual studio extensions project, I have VS10 SDK installed and was able to create a new project and can build it fine, however when I attempt to debug symbols are not loaded. I know that I can debug to VSIX project since I have downloaded a sample project online and it symbols are loaded and break points are being hit fine http://weshackett.com/2009/11/configure-vsix-project-to-enable-debugging/). So must be something specifically to do with the way I have

Creating VSIX package for TFS Source control explorer context menu extension

随声附和 提交于 2019-12-13 18:26:21
问题 I am trying to create VSIX package to extend functionality of TFS 2012 source control right click context menu when clicking on branch. I don't want to use Add-in. this has to be package which other developers can directly install. The customized menu items need to appear in the source control explorer contextual menu after they install the extension. I am not able to get any sample for this requirement or not able to get proper documentation source. One of sample I found is "TFS community

When defining a Visual Studio COM interface in C#, which class / method / parameter attributes should I use?

隐身守侯 提交于 2019-12-13 07:41:05
问题 VS 2017 defines this interface in Microsoft.VisualStudio.Shell.Interop.15.0.DesignTime.dll: [Guid("A459C228-5617-4136-BCBE-C282DF6D9A62")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IVsSolutionEvents7 { void OnAfterCloseFolder(string folderPath); void OnAfterLoadAllDeferredProjects(); void OnAfterOpenFolder(string folderPath); void OnBeforeCloseFolder(string folderPath); void OnQueryCloseFolder(string folderPath, ref int pfCancel); } I want to implement that

How to create command menu item with checkbox?

不羁岁月 提交于 2019-12-12 21:15:51
问题 I'm writing a VSPackage and I need to have menu item with checkbox, just like on this sample image below: I went through this msdn reference regarding .vsct files, bud didn't fine any information explaining how to do it. What I have now is standard menu item with icon and text (code sample from MyPackage.vsct file): <Buttons> <Button guid="guidMyPackageCmdSet" id="cmdidMyPackage" type="Button"> <Icon guid="guidImages" id="myPackageBitmap" /> <CommandFlag>TextChanges</CommandFlag> <CommandFlag