visual-studio-extensions

Visual Studio SDK get type modifier information - is type abstract or internal?

谁说胖子不能爱 提交于 2020-04-18 12:35:36
问题 I use the IVsObjectList2.GetCategoryField2 method to retrieve different information of a type. Now I wonder how I can retrieve C# specific information like abstract or internal modifier of a type? The Object Browser can displays this informations. Update 1: I have made another attempt to get this information. Via the DynamicTypeService and the IVsHierarchy (of the project) I can get the TypeResolutionService . This can then return the Type I'm are looking for, and form the Type I get the

How to get project folder on a VSIX project

倾然丶 夕夏残阳落幕 提交于 2020-02-25 03:54:08
问题 I'm developing an extension for VS2015 and i need to get the project folder of the opened solution. And then find the bin folder to get the output DLL. All this because i need to instantiate a class from the output DLL using reflection. I tried to get some information from msdn but it's difficult to me understand. Is there a way to do this? Thanks in advance 回答1: You could try something like this... Find the project file of interest (maybe the startup project), or let the user select it. The

VSIX Extension uses 3rd party DLLs unable to load one of the dependency

ぐ巨炮叔叔 提交于 2020-02-24 12:09:30
问题 I am developing an extension to VS2013. Since it will be installed through MSI, I am changing the base directory to installation folder using ProvideBindingPath attribute to package class. But the 3rd party dll reference which will be loaded in runtime is not picking dll from the probed path. Its always looking into Visual studio devenv.exe folder. Is there any way to force the dll to look into my installation folder. using MD=Microsoft.VisualStudio.Modeling.Shell; MD.ProvideBindingPath

VSIX Extension uses 3rd party DLLs unable to load one of the dependency

血红的双手。 提交于 2020-02-24 12:08:59
问题 I am developing an extension to VS2013. Since it will be installed through MSI, I am changing the base directory to installation folder using ProvideBindingPath attribute to package class. But the 3rd party dll reference which will be loaded in runtime is not picking dll from the probed path. Its always looking into Visual studio devenv.exe folder. Is there any way to force the dll to look into my installation folder. using MD=Microsoft.VisualStudio.Modeling.Shell; MD.ProvideBindingPath

How can I nest Tool menu buttons for a VS extension?

笑着哭i 提交于 2020-02-24 10:18:37
问题 I am building my first VS extension, so my current skills in this area amount to following tutorials and asking questions. The extension is for encrypting/decryption a section of the web.config file of a web app project. I have 2 commands, and currently the buttons are set up in the .vsct file as follows: <Buttons> <Button guid="guidEncryptConfigCommandPackageCmdSet" id="EncryptConfigCommandId" priority="0x0100" type="Button"> <Parent guid="guidEncryptConfigCommandPackageCmdSet" id=

How to get terminal window inside Visual Studio 2017 / 2019?

╄→尐↘猪︶ㄣ 提交于 2020-02-01 02:22:30
问题 I was just reading this article - https://devblogs.microsoft.com/dotnet/visual-studio-2019-net-productivity-2/ and noticed in one of the GIF image, she is showing a terminal window inside VS editor itself. It looks like a fully fledged powershell window. How can we get that? Here is a screenshot. 回答1: How can we get that? The Terminal Window in the video seems to comes from a VS extension Whack Whack Terminal. You can download and install it in your vs2017. (Note:For vs2017, it should be

Visual Studio SDK - Handle File Save Event

柔情痞子 提交于 2020-01-31 03:10:26
问题 I would like to run a script after files with certain extensions are saved in visual studio. I am wondering where the event handler for saving a file is located in the Visual Studio SDK API. Can anyone point me in the right direction in terms of API documentation for visual studio extensions. I have found the Visual Studio SDK Reference but some direction or sample examples would be helpful. I want to create partial designer files that are usually generated when the project is built (Mono for

Detect Setting from Visual Studio Custom Extension

橙三吉。 提交于 2020-01-24 12:45:22
问题 I am updating an existing Visual Studio extension to be compatible with Visual Studio 2019. This extension allows devs to create a custom project type. When users click Visual Studio's "Create" button to create a new project of this custom type, the extension shows a custom form to retrieve certain info from the dev before the extension creates the project. This is accomplished from within a Wizard class library specified in the vstemplate of my extension: <WizardExtension> <Assembly>..

VS 2013 SDK: How to develop an extension accesible through the editor's contextmenu?

╄→尐↘猪︶ㄣ 提交于 2020-01-17 04:15:15
问题 I'm using Visual Studio 2013 . The project wizard of a Visual Studio Package project gives these three options: However, what I pretend to do is create a very simple extension (which modifies the selected text) and it should be accesible through a command from the contextmenu of the text-editor, not a menu command neither a tool window and neither a custom editor (...I think). Firstly, what is the project that I should select for my needs? (I'm using a menu command). Secondly, what are the

How to give Administrator Privileges to my VSPackage?

泄露秘密 提交于 2020-01-17 01:21:29
问题 I've developed a VSPackage for Visual Studio, which needs to copy some files to Visual Studio's Installation Path . If I Run Visual Studio as Administrator (when using my installed VSPackage). It can copy files with no errors. When I run Visual Studio normally, I get Access to the path ... is denied error. Question How can I give my VSPackage to admin privileges even when the Visual Studio is being run as a normal user. Or at least how can I invoke something like this: 回答1: Your package is a