by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Yann Duran
@yannduran
@gmocontreras-dev In addition to @gmocontreras-dev's suggestions, make sure you didn't forget to switch from release back to debug. i've been caught out by that myself
Yacoub Massad
@yacoubmassad_gitlab
But it seems that for some reason, my ITextViewModelProvider implementation is not called by VS. Even VS2017.
Hello. I trying to create a window tool in Visual Studio to provide a custom view of a C# file. That is, I want what is viewed in the window to be a certain projection of the C#, not the exact C# file content. This article I think points to the right direction: https://joshvarty.com/2014/08/01/ripping-the-visual-studio-editor-apart-with-projection-buffers/
Where can one get help on this?
Forgive the order of messages. I had to retry sending them. Not sure why this happened.
Steven Kirk
@grokys

Hi, in recent VS updates we are dealing with the following issue; our code editors based on Microsoft.WebTools.Languages.Html.VS.Package.Common.WebEditorFactory hangs on "Waiting for IntelliSense to finish initializing...". This happens when the code window is opened upon solution load. Any idea if there si anything we can do?

@jakubmisek yep, same here. i was even getting it when creating a new C# file. you can stop it happening by going to Options -> Environment -> Preview Features and unchecking "Load projects faster"

also it appears the the VS team don't come here any more, so not sure we'll get a proper answer as to how to handle this
Alexander Gayko
@AdmiralSnyder
hi, is there extension capabilities for the Goto All window (or Ctrl-Q search)… i wanna add own search commands, if possible...
Yann Duran
@yannduran

@AdmiralSnyder I thought I'd seen something along these lines, but I wasn't interested enough at the time to be able to remember where I saw it (if indeed I did see something).

I can't find the right search terms to find anything in a google search. Maybe someone else will remember, or be able to answer your question more definitively

Alexander Gayko
@AdmiralSnyder
thank you
Jakub Míšek
@jakubmisek
@grokys thank you for the hint! so it is related to the project system; we have migrated to CPS, maybe we can turn it off by adding a ProjectCapability?
Steven Kirk
@grokys
maybe? no idea of any details beyond what i already wrote, i'm afraid
A. M. Sabuncu
@sabuncu
@jakubmisek Hi Jakub. What exactly is CPS? (Bing says it's Cloud Platform System.) Thank you.
Joseph Musser
@jnm2
A. M. Sabuncu
@sabuncu
@jnm2 Thank you so much. Regards.
Alexander Gayko
@AdmiralSnyder
hey, i'm building a DebuggerVisualizer and get an RPC_E_CALL_REJECTED COMExceptions from the VisualizerDevelopmentHost from time to time, and - which is at least consistent - CannotUnloadAppDomainException - do i have to worry about those when in real VS, debugging?
Oleg Tkachenko
@olegtk
@grokys , @jakubmisek you probably need to make your editor factory to opt out from by setting DeferUntilIntellisenseIsReady, e.g. see https://github.com/dotnet/roslyn/blob/f1bd19828d492d3720f0b2b3aca9bf900a0a2e0d/src/VisualStudio/CSharp/Impl/PackageRegistration.pkgdef#L135
@AdmiralSnyder, yes, GoTo and VS Search are extensible, how are you trying to extend them?
Jakub Míšek
@jakubmisek
@olegtk thank you!
Sun Hui
@sunhuizlz
image.png

this is our first open source visual studio extension

Download address: https://marketplace.visualstudio.com/items?itemName=TangramDev.cloud-app-studio

github: https / / https://github.com/TangramDev

Welcome to give reasonable suggestions and feedback

gmocontreras-dev
@gmocontreras-dev
@paul1956 @yannduran Thank you. With your help I was able to solve the problem.
Yann Duran
@yannduran
@gmocontreras-dev That's great!
gmocontreras-dev
@gmocontreras-dev
Hello friends how are you?. I would like to ask if there is any way to detect when a user adds a new project to the solution. I was thinking of adding a filewatcher, but I don't know if it will be the most appropriate. I appreciate your help.
Yann Duran
@yannduran

Did you look into SolutionEvents?

A search for "visual studio solution events project added" brought up How do I subscribe to solution and project events from a VSPackage

gmocontreras-dev
@gmocontreras-dev
@yannduran It is what I needed. Thanks again!!!
Yann Duran
@yannduran
you're welcome
Veselin Ivanov
@vvatkov
Guys, does Visual Studio Toolbox has public events? I need to subscribe for an event that occurs when a WPF / WinForms toolbox item is dragged. A similar event in the designer could do the job as well.
Paul M Cohen
@paul1956
@gmocontreras-dev your welcome, great news.
Yann Duran
@yannduran

Has anyome ever tried to add a WPF WebView control from Microsoft.Toolkit.Wpf.UI.Controls to a ToolWindow?

I know that the WebView control has been deprecated in favor of the new WebView2 control, but it currently has a dependency on Edge Canary build and I don't want to install that.

Ertan YILDIZ
@ertanyildiz
Hi everyone. I'm newbie to VS extensions and I need to develop an extension. I have a list of line numbers and I need to highlight/mark each line that in the list. How can I do it? Any help appreciated. Thanks.
Cameron
@cameron314
@ertanyildiz You'll want to export a MEF component that implements IVsTextViewCreationListener
once you have an ITextView, you can get the ITextBuffer which gives you access to the current snapshot, lines, etc.
It's one of a series of blog posts he has, very useful. It's slightly old in that the examples refer to "Custom Command" instead of "Command".
@cameron314 I recognize you from SO, glad to see you here, you have been so helpful on SO, thanks again. :)
Ertan YILDIZ
@ertanyildiz
@cameron314 @sabuncu thank you all. appreciated.
A. M. Sabuncu
@sabuncu
@ertanyildiz Cameron is the real expert here!
Cameron
@cameron314
Thanks guys :-) I'm no expert, just worked a lot with the shell
I don't hang out much on the channel anymore so @mention me when needed
A. M. Sabuncu
@sabuncu
@cameron314 Great, now that we have your approval, I will use it liberally. :thumbsup:
:smile:
Cameron
@cameron314
:P
gmocontreras-dev
@gmocontreras-dev
Hello boys how are you?.
I am trying to catch the event of adding project to solution, but this is not working (Does not call method OnProjectAdded) 😅.
The code below is implemented in the main window of my extension. The truth, I do not understand what I am doing wrong. I already thank you for your help.
    `private DTE2 _dte2;
    private Events2 _dteEvents;
    private SelectionEvents _selectionEvents;
    SolutionEvents _solutionEvents;
    public MainWindowControl()
    {
        this.InitializeComponent();
        _dte2 = ServiceProvider.GlobalProvider.GetService(typeof(EnvDTE.DTE)) as DTE2;
        _dteEvents = _dte2.Events as Events2;
        _solutionEvents = _dteEvents.SolutionEvents;
        _solutionEvents.ProjectAdded += OnProjectAdded;
    }
    private void OnProjectAdded(Project Project)
    {
        //my code
    }`
Yann Duran
@yannduran

@gmocontreras-dev you need to put this code in the InitializeAsync method in your package class, not in the constructor of a user control.

And make sure that _dteEvents, _solutionEvents are what I've seen called rooted, meaning that they are fields of the package itself, so that they don't go out of scope anfdget garbage collected.

Veselin Ivanov
@vvatkov

Guys, does Visual Studio Toolbox has public events? I need to subscribe for an event that occurs when a WPF / WinForms toolbox item is dragged. A similar event in the designer could do the job as well.

I found a convenient approach using the IToolboxService and ToolboxItem.ComponentsCreated which works just fine.

Matt Lacey
@mrlacey
@vvatkov Note that the XAML (WPF) designer is getting changes for extensibility. See https://github.com/microsoft/xaml-designer-extensibility , and for items dropped from the toolbox look at Microsoft.VisualStudio.DesignTools.Extensibility.Model.DefaultInitializer
Veselin Ivanov
@vvatkov
@mrlacey Thank you! I noticed that IToolboxService does not work with WPF toolbox items at first glance on my spike. WinForms items however were accessible. I will check Microsoft.VisualStudio.DesignTools.Extensibility.Model.DefaultInitializer.
Ertan YILDIZ
@ertanyildiz
Hi. I'm trying to develop an extension that will highlight lines and show tooltip about the line. I did the highlighting with editorclassifier template with no problem. However when I try to implement this sample in my code it wont work. do you have any idea about the issue?