Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Aleksandr
@aldanchenko
Hello, could someone give an advice how I can get all solution files? I tried to use ProjectItem class, but by some reason I got only 2 files instead of 300 :)
18 replies
iitaiy
@iitaiy
Hi, I'm try to develop Visual Studio extension 2019 while using VS2022. There is a way to deploy it on the VS2019 experimental instance by default? More details: https://stackoverflow.com/questions/71533271/how-to-run-visual-studio-2019-experimental-by-default-from-visual-studio-2022
2 replies
Miloslav Beňo
@Miloslav
Hello, we've based our projects on CPS. Once the project is on source control(in this case Git) The scc glyphs are not shown when the project first loads. Only after unloading/reloading the project do they appear. This wasn't an issue on our legacy project system based on MPF, since we've handled IVsSccProject2 implementation on our project node. How can we debug this and find out where is the issue? Is there someone we can contact?
2 replies
Philipp
@xXPancakeXx
Hi, currently trying to create a simple extension for VS2022, which adds automatically generated code. The main problem is that my extensions crashes randomly when executing a command as follows await VS.Commands.ExecuteAsync(Microsoft.VisualStudio.VSConstants.VSStd2KCmdID.FORMATDOCUMENT) in the execute async method. I tried googling that but no luck. Is there any chance anyone here knows why this could be happening? Or any other way to format my document to have a workaround on this issue. Many thanks in advance
3 replies
Abyss
@CsabaStupak

Hi, I'm developing a C++ extension for VS2022 which updates the solution dependencies based on the C++ project's libraries. I'm using dte.Solution.SolutionBuild to obtain the solution BuildDependencies. The problem is that it stopped working after recent VS2022 update and it returns null for EnvDTE.BuildDependency.Project. Is there any alternative API how can I access the solution build dependencies and adjust it (add/remove) ?

EnvDTE.DTE dte = await VS.GetServiceAsync<EnvDTE.DTE, EnvDTE.DTE>();
var build = dte.Solution.SolutionBuild;
foreach (EnvDTE.BuildDependency iter in build.BuildDependencies)
{
if (proj.FullPath == iter.Project?.FileName)
return iter;
}

Any help is appreciated :-)

1 reply
Aleksandr
@aldanchenko
Hello, maybe someone know is there a property as ID for EnvDTE.Solution?
5 replies
perdigo-n
@perdigo-n
Hello extenders! I would like to develop a debug visualizer for c++, it cannot be done with .natvis alone cause it is a binary (void pointer) and its metadata is in a different variable, both would be provided by the user who is debugging. I was wondering if could give me any pointers. Could I do this with a c# tool extension? Do I need to do it in c++ (like this https://github.com/microsoft/cppwinrt/tree/master/natvis)? What is the best way?
Aleksandr
@aldanchenko
Hello, maybe someone know how to listen .csproj file changes?
Matt Whitfield
@mattwhitfield
@aldanchenko you may want to check out the IVsSolutionEvents interfaces
Vyacheslav Avdeev
@lsoft
@aldanchenko FileSystemWatcher ?))
Antonín Procházka
@prochan2
Hi all! I've got a question to https://github.com/microsoft/VSProjectSystem/blob/master/doc/extensibility/IProjectGlobalPropertiesProvider.md : Am I guaranteed that any build, no matter how soon after VS startup it is executed, receives the provided properties? And is there something like this also for non-sdk-style projects?
2 replies
TerryFogg
@TerryFogg
Can someone point me in the direction on how I might create my own 'category' folder in a project and add my own custom items, for example, similar to References, or Properties.
1 reply
AraHaan
@AraHaan
Anyone know how to find the color value in my theme for the WMDocumentGroupContainerControl on the background of it when no documents are loaded when the IDE first opens? I been needing to change it in my VSTheme project (among other things that needs fixed in my theme).
meirumeiru
@meirumeiru
can I add own items to the "ResourceView" ? ... I know, the ResourceView is a "tool window" and that I could create my own tool window... but, is it also possible to add a node under the project-node (like the .rc node of C++ resources)?? and if yes, how?
3 replies
meirumeiru
@meirumeiru
does someone know how this works with the items of the "Hierarchy"? ... where do they come from? who's generating them? and how are they implemented?... could I create an object and add it into this hierarchy? ... I'm trying to find out how this works for days now, but... I don't understand it... maybe because I'm overlooking the parts talking about it
2 replies
Christopher Christou
@awschristou
My extension (MyVsix.csproj) contains plugin-style dlls (MyPluginA.csproj/MyPluginB.csproj) in the vsix. These plugin dlls do not reference the Visual Studio SDK. My extension does not directly use any types from the plugin dlls (it uses reflection or MEF to discover and instantiate). Is there a way to have Visual Studio auto-load these plugin-style dlls as part of the extension initialization without explicitly making Assembly.Load calls?
Julien
@juli1
Hi folks, I am looking to hire a developer to develop a Visual Studio extension. What place do you recommend for posting the job and/or attract Visual Studio developers?
1 reply
jonmiller1
@jonmiller1
I want to create a custom project type. I came across some documentation that says I should the VSPS (Visual Studio Project System Extensibility). When I go to the github site for it, it hasn't been updated since VS2017. Is this project dead? What should I do for VS 2022? https://github.com/microsoft/VSProjectSystem
1 reply
hefaistos68
@hefaistos68:matrix.org
[m]

Hello, I have added the Community.VisualStudio.Toolkit to my VSIX project to get the theme styles right, but after adding the nuget package (for vs2022) and inserting the tags as shown in the sample code,

<UserControl x:Class="mine.GeneralOptionsControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dw="clr-namespace:mine"
             xmlns:toolkit="clr-namespace:Community.VisualStudio.Toolkit;assembly=Community.VisualStudio.Toolkit"
             toolkit:Themes.UseVsTheme="True"

I get XAML errors: error MC3072: The property 'Themes.UseVsTheme' does not exist in XML namespace 'clr-namespace:Community.VisualStudio.Toolkit;assembly=Community.VisualStudio.Toolkit'.

any ideas what I am doing wrong?

1 reply
Aleksandr
@aldanchenko
Hello 👋. Could someone share how to get path to solution? I can get solution path in normal case, but if *sln file placed in not root folder of solution I get only path of this sln file. As an example
Screenshot 2022-04-09 at 13.19.14.png
martin-honnen
@martin-honnen
vs2022XMLDocumentPropertyStylesheet.png
Does anyone know how, from a VS 2022 extension, to read out properties like "Schemas" or "Stylesheet" the XML editor adds to XML files? They show us in the property list when a tab with an XML document is active and the VS user can select a schema there or even a stylesheet (although I think the stylesheet field is there in the community edition of VS without having any attached functionality, only the commercial editions use to offer XSLT execution or debugging). Anyway, for an extension I would like to be able to read out those properties but I haven't been able to find an obvious way how to do that. Any suggestions appreciated.
1 reply
nbkalex
@nbkalex
Hello everyone! Is there any event/property/function/xaml resource to get the zoom level of the text/code editor?
7 replies
Michel Kaporin
@michelkaporin

Hi folks! I am setting up extension publishing pipeline to Marketplace using VsixPublisher. When I run it, I get the following error:

VSSDK: error VsixPub0029 : An error occurred while communicating with the marketplace: vsixId: The VSIX ID in the provided file is already in use. Every extension needs to have an unique ID. Provide a file with an unique ID.

I have published extension previously via Marketplace but it seems it tries to publish as a new, instead of updating the old one. I am publishing using the same extension ID as well as bumped up version. Do you know what could be the problem? Thank you!

1 reply
mmkuklinski
@mmkuklinski
Is there an API that one can use to load/store properties/values directly in the solution file itself rather than in an SUO?
AraHaan
@AraHaan
Has anyone here ever created a project type extension that has only a single feature (build)? I am trying to make an extension that provides support for a special type of project that can only be built and can not be debugged. Basically has only 2 targets ("Build" and "Rebuild").
Martin Eriksson
@meriksson1991
Hello! I am new to visual studio extensions and have an idea of extending the visual studio debugger but am having a hard time finding any samples for this kind of extension. Can someone here point me in the right direction? Would be highly appreciated.
Fabio GS
@onolox_twitter
Hi people, in an c# editor, there's a way to get the object class of an item under the cursor? With CodeElement I can get the function, but the itens inside I don't. If I put the cursor over an people.getName(), how do I get the full class name of it?
5 replies
jonmiller1
@jonmiller1
I'm new to VS extensions. I want to write a custom project system. The examples out there seem very old an outdated. Is there anyone that can help me out? I would pay $ for some advice and guidance.
2 replies
Sateesh Kumar Vinjamuri
@vsateeshk_twitter
My VS Extension have custom Menu New Items in Solution Explore->Right Click -> Menu node Items.
But when I build extension code in Visual Studio 2022 build then Menu new custom item nodes are not showing in my VS Extenstion
Any idea, what code changes I have to look in (.vsixmanifest) files
2 replies
Scott Haney
@ScottHaney
When a special file type is double clicked in solution explorer I want to open not that file but a filepath within that file. I overrode IVsRunningDocTableEvents4.OnBeforeFirstDocumentLock to try to do this but no matter what I do in that method (or any other method) I can't seem to stop the file that was double clicked from opening. When I try the DTE events they say something about not being able to close a file from an event handler. How do you stop a file from opening and instead open another file? Right now I call .Hide() on the opened file and that works as a hack.
1 reply
Jonatan Gefen
@jgefen
Hi, I have created an IAsyncCompletionUniversalSource for xml file, but when I use it I get 2 completion list opened - one of the internal xml editor and mine. How can I merge the 2 lists into one completion list?
image.png
Antonín Procházka
@prochan2
Hi, which extension point would be the best (or at least would work) to execute code before any build starts? (Or will bock the first build before this code is executed.) I need to pass an msbuild property to a build of a legacy (not SDK-style) C#/VB project.
1 reply
Matt Whitfield
@mattwhitfield
Hello all. For the 'New Project Dialog' it lists the .net versions (netcoreapp and newer) along with a description like 'Long term support'/'out of support'. Could anyone tell me how to get that list from the VS SDK? I tried with IVsFrameworkMultiTargeting but that seems to list netFx versions only...
JohanKustner
@JohanKustner
Hi all.
Hi all. I recently updated my extension https://marketplace.visualstudio.com/items?itemName=JohanKustner.Dynamics365StrongTypeEntityClassGenerator but have noticed that whilst it is available in the Visual Studio Marketplace, it no longer appears within "Manage Extensions" in Visual Studio. I also added a new version of it to work with Visual Studio 2022 at https://marketplace.visualstudio.com/items?itemName=JohanKustner.DataverseClassGeneratorVS2022 but am experiencing the same problem with this VSIX. Any ideas?
8 replies
Uniwares
@hefaistos68:matrix.org
[m]
Or whatever your specific target is
Silly question: did you mark 2022 on the "manage" page for your extension on the market place?
1 reply
Steve Trautman
@SteveTrautmanPEI
I'm wanting to create a new extension in VS 2022 that is a customer editor (fairly involved, grid display the data file, with properties, a custom menu, and a tool window). The docs I can find so far led me to a c++ template which got me basic custom editor, great. But the doc starts off saying that there is no longer a c# template available. My question is, how do I add a custom menu in c++? All the docs/examples for that functionality are in c#. I can't find any docs/apis/examples of adding a new custom menu with c++.
manuelxmarquez
@manuelxmarquez

@SteveTrautmanPEI Not sure about C++ but you can use IVsEditorFactory and WindowPane to host a WPF control. I have a prototype of it but can't share that particular project. Maybe search GitHub for an example.

I saw this yesterday and it's a great API to make life simpler and has an example of a menu, or just create the sample project template.
https://docs.microsoft.com/en-us/visualstudio/extensibility/vsix/get-started/first-extension?view=vs-2022

https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.interop.ivseditorfactory?view=visualstudiosdk-2022
https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.windowpane?view=visualstudiosdk-2022

Matt Whitfield
@mattwhitfield
@SteveTrautmanPEI There's an example of a custom editor in my extension - https://github.com/mattwhitfield/Unitverse - look in the src/Unitverse/Views folder 👍
Matt Whitfield
@mattwhitfield
Actually, sorry - src/Unitverse/Editor - the hosted control is in the Views/ folder
Erik Ejlskov Jensen
@ErikEJ
mmkuklinski
@mmkuklinski
With a Package that is marked as PackageAutoLoadFlags.BackgroundLoad, is there a way to give it priority? I don't mind it loading asynchronously, but I'd rather it gets triggered/loaded before Intellisense starts processing for 10 minutes.
Kaveesh Dashora
@kaveeshd
This message was deleted
ShettyRGanesh
@ShettyRGanesh
Screenshot (41).png
1 reply
Robert van der Hulst
@RobertvanderHulst

Hello! I am new to visual studio extensions and have an idea of extending the visual studio debugger but am having a hard time finding any samples for this kind of extension. Can someone here point me in the right direction? Would be highly appreciated.

https://github.com/microsoft/ConcordExtensibilitySamples

LeChat
@Krusty84
Hello Dear All, does anybody have the samples/snippets what explain how interact command on the toolbar with tool window? Thanks!