Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Thomas Zitzler
@lsoft Thank you very much
Vyacheslav Avdeev
I've converted all of my vsix with no problem after watching that.
come back if any difficulties arise))
Andy Hippo
@vasantha-kumar25 Hi, sorry it took me soooo long, but I finally got the time to describe the process of installing VSIX from MSI -- https://werat.dev/blog/installing-visual-studio-extensions-from-msi/
I hope it helps you!
Hi, is there any way to add a separator or an unselectable item to a combobox?
Hey everyone, is it possible to disable the design time features for *.razor files in some way? Thanks!
Robert van der Hulst
@werat Thanks for sharing this.
Nils Andresen
Hi People, I am working on an extension and I somehow "broke" the commands which means all of my commands/menus are gone (do not appear) is there some way of enabling verbose logging or debug what is happening?
4 replies
Robert van der Hulst
Does anybody know or have a link to documentation about what a 3rd party development language has to do / has to implement to support Edit and Continue ( and in the future also Hot Reload) in Visual Studio.
I know that I can find some information by looking at what the Roslyn team has done, but some documentation would be helpful.
Aleksandr Danchenko
In my extension I need to get file text by file name (path), line and start/end columns. How can I get this information? Which VS classes can I use for this? Thank you!
Vyacheslav Avdeev
@aldanchenko why do you need VS classes to operate with a file which path is known and the position inside it is also known... can you expand your question?
@aldanchenko also, if we are talking about c# source file, roslyn has such stuff (to get text by position)... what kind of file is? is the file is in solution or not?
8 replies
What would be the different ways to change the Status bar colors dynamically? It has to be lite and not slow down VS, so I guess nothing like Reapplying a modified theme.
Vyacheslav Avdeev
hello! does anyone know how to get solution filter name (name of slnf file) from vsix? dte.Solutioncannot help... VS show slnf on its main screen, but how to grab this info from vsix is completely unclear
hi, does anyone know how to communicate with another vsix, or call?
and if we can use web controll in our vsix?
3 replies
Kaveesh Dashora
I have a toolbox where I am displaying custom search results, Everything works fine. I want to extend that functionality to support the Find Next and Find Previous options through hotkeys. Is there a way to do that?
John J. DeFalco
can I change these icons via an extension?
2 replies
Erik Ejlskov Jensen
Why would you want to use a Microsoft.VisuslStudio.SDK version higher than 16.0 in an extension targeting VS 2019?
1 reply
Hi all! Name's Brian, I am new.

I am currently working on a custom multi-project template for VS that I want to use a Wizard Extension with in order to prompt the user to selectively generate the projects. To do so, I've implemented a Root Wizard (RootWizard class) and Child Wizard (ChildWizard class). The ChildWizard class is configured in the .vstemplate file of each project to be generated, and the RootWizard is provided in a WizardExtension template in the top-level .vstemplate file. Both RootWizard and ChildWizard have some stuff in common...such as Configuration, logging etc. I wanted to derive an ABSTRACT class, WizardImplBase that implements IWizard abstractly, and then derive RootWizard and ChildWizard off of it. When I do so, however, and then run the Create New Project process in VS, then I bump into the error that VS says "There is no RootWizard class in assembly MyProjectWizard.dll".

Do the Create New Project flow and .vstemplatenot play nice with an abstract base class implementing IWizard?

When I push everything down from the abstract class to the child classes it works, but it's a lot of code redundancy.
Andreas Schmitt
Does anybody have a good resource to get started with custom editor development? Our plan is to have a custom XAML/Preview editor for a custom XAML implementation. However all the MSDN documentation on this topic is hopelessly outdated and reverse engineering this stuff from other github projects and samples is proving to be only partially helpful. I haven't been able to find any decent resource on this subject that goes through it step by step. Finished examples are not really helpful since it's not immediately obvious what the basics are which are absolutely necessary and what is custom to the sample, whether used GUIDs are project specific or stand for something defines by the SDK and if so where to find those definitions.
If anybody knows a good step by step documentation/tutorial/video/anything on custom editor/designer development I'd love to hear about it.
1 reply
Brien King
Howdy, anyone awake? :)
I currently have some ugly code that I use to get the IDesignerHost for Winforms, I'm wondering if there is a better way to get it?
Frank Naumann

What I am asking for is just a hint to the right approach to solve my task.
I have started to develop a VS extension to simplify the recurring implementation of state machines.
Creating an "Item Template Wizard" was no problem. It creates the folder structures , copies the default files and adjusts their contents, eliminates optional files if they are not needed. So far so good.

But for the further steps the approach of the "Item Template Wizard" seems to be not sufficient.
I want to be able to enter a list of states on the wizard dialog and add a file State.<Statusname>.cs to the project for each state.
Additionally the state should be added to the enumeration StatemachineX.States.cs and some special adjustments should be done in StatemachineX.Main.cs.

Of course, I want to reuse the code to add individual states during development. But that is a task for the future.

The following illustration shows the project part to be created:

+- ...
+- any other project files
+- ...
+- ...
+- any optional files // default files
+- ...
+- StatemachineX.States.cs // default file
+- StatemachineX.Events.cs // default file
+- State.Base.cs // default file
+- State.XXXX.xs // default file
+- State.X1 //
+- State.X2 // according to the states enumeration ...
+- State.X3 // defined by the developer
+- ... //
+- State.Xn //
+-StatemachineX.Main.cs // default file - main class of the state machine

If someone has the solution ... please don't tell (before I beg on my knees).
Links to solution approaches on the other hand ...


Hi everyone, I'm trying to get my extension ready for 2022 and I'm having issues with the settings manager.

I'm using Mads' BaseOptionModel. Everything worked fine in 2019, but in 2022 it's throwing in this line when trying to lazily create the AsyncLazy<ShellSettingsManager> _settingsManager.

The exception is a MissingMethodException claiming that ShellSettingsManager doesn't have a ctor that takes an IVsSettingsManager. But judging from the message, the exception acutally seems to relate to this line.

10 replies
Brien King
Does the Microsoft.VisualStudio.SDK not support class libraries?
Libraries are Framework 4.8
Brien King
When I try to add the Nuget Package Microsoft.VisualStudio.SDK it fails with "Could not install package 'Microsoft.ServiceHub.Analyzers 2.8.10'. You are trying to install this package into a project that targets ..."
Brien King
Well, I cheated and added a new VSIX project and will use that as the starting point for my Library. Apparently the Template will add the NuGet Packages, but it doesn't seem like you can add them to a normal Library project.
Brien King
Well, I have a rather annoying issue. This code:
        PropertyDescriptor propInfo = null;

        propInfo = TypeDescriptor.GetProperties(p_component)["Name"];
        propInfo.SetValue(p_component, p_newName);
fails in the Experimental Visual Studio (when debugging), but works just fine in Visual Studio if I install the Extension.
p_component is the new control I created via designerHost.CreateComponent
I take that back, p_component is an existing control I got from the designer host.
The error I get is:
Code generation for property 'FormatType' failed. Error was: 'Type 'Warp10.DeveloperExpress.Controls.EditControls.TextEdit+FormatTypes' is not available in the target framework.'
Brien King
Which is weird because that's not the control that I am renaming.
Aleksandr Danchenko
Hi everyone 👋, could someone know is it possible to set ToolWindow open by default? I mean if user install an extension and open VS it will see ToolWindow (without open it from View menu item). Something like Style = Microsoft.VisualStudio.Shell.VsDockStyle.Tabbed property. Thanks! 🙏
4 replies
Christopher Christou
Is it possible to start with an IVsHierarchy (x) for an arbitrarily selected item in the Solution Explorer and determine an IVsHierarchy (p) for the project that x belongs to? I'd like to understand how to do this without using EnvDTE. I've tried using GetProperty and __VSHPROPID.VSHPROPID_ParentHierarchy without success.
1 reply

Hey guys, I've implemented this before using reflecting and attributes, but I'm curious if someone has done something like this before.

Basically, anytime a class implements an interface, visual studio autogenerates a static "IFactoryGenerator" class, and appropriate overridden "Create" methods.

The crude way I did it before was, reflect over the codebase for any class tagged with "CreateFactory" attribute, and then generate a "IFactoryGenerator" static class, with pass through implementations.
Jialong Cheng
@kcbanner_twitter Sorry for the late response. I didn't get any notifications either.
Let me try to understand the problem: it appears that the dialog (part of the async task scheduled with search) showed up early enough with either "Normal Priority" or the UIthreadBackgroundPriority. The issue is actually that the WPF redraw of the search results is non-deterministic when using Dispatcher.Normal priority. Is that correct? If so, the problem lies in WPF redraw, not the task scheduling part.
If the above assumption was correct, do you mind sharing how your draw the search results on the UI?
1 reply
Hey guys
I've started creating my first visual studio extension, yet I have some problems with the databinding ("x:bind" or "{binding}") in xaml, does someone have a repo with an example using databinding in a visual studio extensions project?
I solved it, so for people who are also having trouble I used this example, turns out I cant use "x:bind" in xaml and should use that "DataContext" property of the toolwindow : https://github.com/madskristensen/SolutionExtensions/blob/61334eb283be2314f9df48a5dfcf64578e00a51e/src/ExtensionManager/InstallerDialog.xaml.cs
Tri-Edge AI
I am using BaseCodeGeneratorWithSite, but is there an async version of this somewhere? My GenerateCode logic takes 200-300ms and it creates a really annoying lagspike everytime I hit Ctrl+S while editing the file, which I do all the time instinctively.

VsixTesting allows you to easily create integration tests for your Visual Studio Extensions.

I just added support for Visual Studio 2022.

I've also created a pull request to properly initialize the Visual Studio Experimental Instance in the images used by GitHub Actions / Azure Pipelines to ensure that the integration tests execute very fast.

The fastest way to try this library is by cloning https://github.com/josetr/VsixTestingSamples which also has been updated to support Visual Studio 2022.

Sorry for the ad. My previous message about it was more than 2 years ago tho.

Neil Henderson
@josetr Thanks for your excellent work on this, it's a great tool!