visual-studio-extensions

Setting cursor position with Visual Studio Extension

杀马特。学长 韩版系。学妹 提交于 2020-11-30 12:03:05
问题 I'm writing my own Visual Studio 2010 Extension that should help me navigating a rather large solution. I already have a dialog based VS Extension that shows me a class name and a function name depending on some search criteria. I now can click this class/method and I then already can open the correct file and jump to the function. What I now want to do is to set the cursor at the start of that function. My code to jump to the function is: Solution currentSolution = ((EnvDTE.DTE)System

NullReferenceException when installing any Extension in VS2019

房东的猫 提交于 2020-06-29 04:48:36
问题 I got the exact same problem posted here: Attempting to Install an extension to VS2019 results in a NullReferenceException Same error, same log. But since I cannot comment nor answer and the question has not been answered as of yet, I'm asking again. I am using VS2019 Community, but I had VS2017 Enterprise at one point. (student license) Every single extension I tried to install so far has led to this error. For example "Live Share", "Open Command Line", "Github Extension for Visual Studio",

NullReferenceException when installing any Extension in VS2019

好久不见. 提交于 2020-06-29 04:48:06
问题 I got the exact same problem posted here: Attempting to Install an extension to VS2019 results in a NullReferenceException Same error, same log. But since I cannot comment nor answer and the question has not been answered as of yet, I'm asking again. I am using VS2019 Community, but I had VS2017 Enterprise at one point. (student license) Every single extension I tried to install so far has led to this error. For example "Live Share", "Open Command Line", "Github Extension for Visual Studio",

Visual Studio extension - get reference to currently selected item in Git history

做~自己de王妃 提交于 2020-06-29 03:43:06
问题 I managed to get a custom button added to the Git history context menu thanks to the help offered here. I'm continuing work at the same extension and am again stuck. Once the button I've added to the context menu is clicked I need to get a reference to the commit that is selected when it is clicked. The idea is that I then need to grab the code changes associate with that commit. I've gotten as far as getting a reference to the ActiveWindow which has a caption of "History - master". Which

VSIX - Minor visual studio version

佐手、 提交于 2020-06-13 09:09:08
问题 Does somebody know if/how it is possible to obtain the minor Visual Studio version that is currently running, from within a VSIX extension? I've already found the following property, but we would like to have the more detailed version number (more parts). https://docs.microsoft.com/en-us/dotnet/api/envdte._dte.version?view=visualstudiosdk-2017 回答1: Assuming you may want the level like X.Y.Z instead of X.0 or X.Y . (e.g: VS2017-15.9.13=>15.9=>15.0). Sergey's great answer can help you resolve

Create Arbitrary Visual Studio COM Object (such as IDebugEngine2) from GUID

蓝咒 提交于 2020-06-01 05:10:09
问题 I am investigating developing a new project system for a language not currently supported by Visual Studio. There already exists a third party Debugger Adapter Protocol server for this language, however as it doesn't seem to work properly with the native DAP client used in Visual Studio I'd like to write my own AD7Engine and simply defer all the calls I don't need to modify back to the original implementation in Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost.dll In theory I feel this

Can't install the extension on Visual Studio 2017 after installing Visual Studio 2019

浪子不回头ぞ 提交于 2020-05-29 10:34:09
问题 Only Visual Studio 2019 is present in VSIXInstaller, Visual Studio 2017 is missing and when I want to install the extension specifically for Visual Studio 2017 I can't do that 回答1: I believe this issue crops up due to the ' Visual Studio Extension File ' not having the appropriate supported VS Version Numbers specified in the ' .vsixmanifest '. (Changing the supported Version Number range will allow support for previous or future versions of Visual Studio.) Here is a Link to an answer of mine

Why does my extension's menu item not appear?

百般思念 提交于 2020-05-17 06:29:21
问题 I am building my first VS extension, to allow users to encrypt/decrypt the mailSettings/smtp section of web.config . I wish to add a menu item that has 2 sub-items to the main VS Tools menu: Config Encryptor Encrypt Mail Settings Decrypt Mail Settings The relevant (I hope) parts of the .vsct file are as follows: <Menus> <Menu guid="guidEncryptConfigCommandPackageCmdSet" id="ConfigEncryptorMenu" priority="0x0100" type="Menu"> <Parent guid="guidEncryptConfigCommandPackageCmdSet" id=

Attempting to Install an extension to VS2019 results in a NullReferenceException

两盒软妹~` 提交于 2020-05-16 08:56:45
问题 I've not been able to add extensions to my VS 2019 since its release. I recently updated to Version 16.4.3 but I still get the same error when I try to add extensions. I've tried to do the following but it still fails with an error dialog above. Install from the Extension Manager in Visual Studio; Download extension from MarketPlace and double-clicking to install; Install using VSIXInstaller.exe Commandline in VS 2019 Developer Command Prompt admin mode. This is what I get from the install

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

百般思念 提交于 2020-04-18 12:35:38
问题 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