visual-studio-extensions

How to get IWpfTextView from command Visual Studio Extension 2017

半腔热情 提交于 2021-02-18 18:14:24
问题 I need to show popup use TextViewAdornment, it's require IWpfTextView. There is old code to that: private IWpfTextView GetWpfTextView(IVsTextView vTextView) { IWpfTextView view = null; IVsUserData userData = vTextView as IVsUserData; if (null != userData) { IWpfTextViewHost viewHost; object holder; Guid guidViewHost = DefGuidList.guidIWpfTextViewHost; userData.GetData(ref guidViewHost, out holder); viewHost = (IWpfTextViewHost)holder; view = viewHost.TextView; } return view; } but when go to

Visual Studio 2019 (Community Edition) - Cannot install/update Extensions

醉酒当歌 提交于 2021-02-11 12:46:55
问题 It's a fresh installation of Visual Studio 2019 Community Edition on my fresh installation of Windows 10 (64 bit) on Intel i3 laptop. Whenever I attempt to install an extension (for example, CodeMaid), I get COM ClassID not found error. I'm not sure why is this error. From google search and after referring to some articles, I think this error is due to 32bit COM on 64bit machine. Visual Studio attempts to look for the COM CLASSID under 64bit registry, but it fails since it might be under

Visual Studio 2019 (Community Edition) - Cannot install/update Extensions

江枫思渺然 提交于 2021-02-11 12:45:26
问题 It's a fresh installation of Visual Studio 2019 Community Edition on my fresh installation of Windows 10 (64 bit) on Intel i3 laptop. Whenever I attempt to install an extension (for example, CodeMaid), I get COM ClassID not found error. I'm not sure why is this error. From google search and after referring to some articles, I think this error is due to 32bit COM on 64bit machine. Visual Studio attempts to look for the COM CLASSID under 64bit registry, but it fails since it might be under

Visual Studio Extensibility: Get the Git repository's path from Team Explorer's Git Commit Details page

冷暖自知 提交于 2021-02-07 19:29:59
问题 I am adding Git integration to my Visual Studio extension Diff All Files, which allows for quickly diffing (i.e. comparing) all files in the Team Explorer window with a previous version. I have it working with the Git Changes page (in Team Explorer), since when I get the Microsoft.TeamFoundation.Git.Controls.Extensibility.IChangesExt service the files in it's IncludedChanges property contain the full file path on disk. However, when working with the Git Commit Details page I get the Microsoft

Visual Studio Extensibility: Get the Git repository's path from Team Explorer's Git Commit Details page

给你一囗甜甜゛ 提交于 2021-02-07 19:29:24
问题 I am adding Git integration to my Visual Studio extension Diff All Files, which allows for quickly diffing (i.e. comparing) all files in the Team Explorer window with a previous version. I have it working with the Git Changes page (in Team Explorer), since when I get the Microsoft.TeamFoundation.Git.Controls.Extensibility.IChangesExt service the files in it's IncludedChanges property contain the full file path on disk. However, when working with the Git Commit Details page I get the Microsoft

How to get project inside of Solution Folder in VSIX project

橙三吉。 提交于 2021-02-07 05:37:27
问题 Hi I am having a problem, with a custom build task inside of a Visual Studio Extension. I need to identify projects of my custom project type. I can do this fine if they are on the root of the solution, but the problem occurs when it is inside of a solution folder. I can get the solution folder as a EnvDTE.Project, but am not sure how to get projects from within that folder. I thought I would be able to get it from the projects Collection property but that is null. Any assistance would be

How to get project inside of Solution Folder in VSIX project

南楼画角 提交于 2021-02-07 05:37:05
问题 Hi I am having a problem, with a custom build task inside of a Visual Studio Extension. I need to identify projects of my custom project type. I can do this fine if they are on the root of the solution, but the problem occurs when it is inside of a solution folder. I can get the solution folder as a EnvDTE.Project, but am not sure how to get projects from within that folder. I thought I would be able to get it from the projects Collection property but that is null. Any assistance would be

VSCT menu items not showing

狂风中的少年 提交于 2021-01-29 08:54:53
问题 Visual Studio 2019 16.5.0 preview 1. I'm trying to get my menu items to show up either in a group or on a different menu. Currently the menu items show up in the View/Other Windows menu on visual studio if I point them to IDG_VS_WNDO_OTRWNDWS1, but if I try to point them to MyMenuGroup, they just don't appear. The code will run but the menu items never show up on the menu. If I try to point the buttons to IDM_VS_MENU_EXTENSIONS, it won't even compile, giving the error below: Undefined 'Parent

app.config inside Visual Studio Extension?

房东的猫 提交于 2021-01-28 10:22:30
问题 I have created a Visual Studio extension representing a Visual Studio Project wizard (vsix package). I am attempting to wire up log4net, and this has been unsuccessful. I have chased the issue down to my app.config not being loaded properly. I have added this to my app.config in my visual studio extension: <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="test" value="hello world"/> </appSettings> </configuration> and within my IWizard implementation, I have added

How do I resize code editor window programmatically with a Visual Studio extension?

馋奶兔 提交于 2021-01-28 05:43:52
问题 I really like how Visual Studio Code snaps and resizes split editor windows. Since I couldn't find anything similar in its bigger brother Visual Studio 2017, I'm trying to write a simple extension to achieve the same result. Using the "Editor View Adornment" boilerplate I discovered that I can access the code editor window, in form of a IWpfTextView; however, this interface does not offer any setter for its positioning and size. 回答1: If you mean snap and resize split editor windows in Visual