tinaschrepfer on tinali
Remove use of "any" content typ… (compare)
tinaschrepfer on tinali
Merge pull request #169 from Mi… Add sample support for "any" co… (compare)
tinaschrepfer on master
Update VSSDK package and remove… Merge pull request #169 from Mi… (compare)
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 .vstemplate
not play nice with an abstract base class implementing IWizard
?
Hello.
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:
Solution
|
+-[Project]
+- ...
+- any other project files
+- ...
+-[StatemachineX]
+-[Options]
+- ...
+- any optional files // default files
+- ...
+-[Defines]
+- StatemachineX.States.cs // default file
+- StatemachineX.Events.cs // default file
+-[States]
+- 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.
PropertyDescriptor propInfo = null;
propInfo = TypeDescriptor.GetProperties(p_component)["Name"];
propInfo.SetValue(p_component, p_newName);
Style = Microsoft.VisualStudio.Shell.VsDockStyle.Tabbed
property. Thanks! 🙏
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.
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.
https://github.com/josetr/VsixTesting
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.
actions/virtual-environments#4143
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.
Hi all, I've been having a go at making a VS extension however I'm totally new to .NET
I've got to the point where I can edit text in the active window using a command button, but what I would really like to do is highlight keywords in the active document in some fashion, like a squiggly underline or changing the colour of the font.
I've now hit a bit of a brick wall where I don't really know the terminology of what I should be searching for. Could anyone point me in the right direction of where I can start reading up on how to implement this sort of behaviour?
Many thanks
StructureTag tag;
tag = new StructureTag(snapshot, outliningSpan, headerSpan, null, null, PredefinedStructureTagTypes.Member, true);
yield return new TagSpanStructureTag(structureSpan, tag);