Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Omar Rwemi
@omsharp
I'm having a weird issue with VSIX I'm developing! The solution builds fine, and I can install the extension using the .vsix file, however when I try to debug the project the experimental instance of VS runs but the extension is not installed on it!
I searched all I can on google, and no luck! Any ideas?
Joseph Musser
@jnm2
@omsharp My go-to for all issues is to start with the start menu item "Reset the experimental instance of Visual Studio"
Then don't just build the project, specifically use the "rebuild" option just in case incremental build thinks there's nothing to do
Dan O'Brien
@InTheCloudDan
does Visual Studio support multiple Language Servers per file? It looks like it does just wondering if anyone oculd confirm
Dmitry
@helviett
Hello everyone! IGlyphFactoryInterface on Mac should return object. But what actually I should return in order to get glyph in the gutter? I tried both NSImage and GtkImage. None of that works.
Dmitry
@helviett
Also, ClassificationFormatDefinition is unable to change foreground color of comment line. Why?
Yann Duran
@yannduran

@omsharp the other thing that i find helps sometmes is to increase the 3rd or 4th section of the version number (if you adhere to semantic versioning, the patch number or the build number)

ie 1.0.0.0 --> 1.0.0.1 or 1.0.1.0

wesbigelow
@wesbigelow
Hello everyone! I'm trying to disable DataTips in the debugger over certain types of variables in C++ so I can display my own custom window. I don't know if I'm on the right path but I instantiated an IVsTextViewFilter so I could override GetDataTipText, but GetDataTipText wasn't called for C++. I also tried to do something with ViewFilter and its GetDataTipText, but I don't see how to get the ViewFilter for C++. About to cast this into the abyss since the datatip popping up is annoying but not critical.
jinyafeng
@jinyafeng
image.png

Hi all,

I created a Visual studio extension (code analyzer with fix + provide a setting in option page)
the setting can be used in VS 2017 Community + VS 2017 Pro + VS 2019 Community.
But not work in VS 2019 Pro + Enterprise

When I downloaded VS 2019 Enterprise and debug my extension, It shows a lot of errors at XAML Binding Failures. Please see above picture.
How do I fix this and debug my extension?

Source code: https://github.com/jinyafeng/DocumentationAssistant

Thanks a lot

Hemant
@hemantnavarkar

@hemantnavarkar
I have Visual Studio Isolated Shell applicaton, I have hosted one Windows Form View on Factory.
The Windows form having Grid control and Property Grid.

Problem is when user clicks on the Property Grid and do Shift+Alt+Enter then window maximize but the same not working on
GridView ?

I tried to handle the KeyDown event as below
private void dataGridView1D_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter && e.Modifiers == (Keys.Shift | Keys.Alt))
{
e.Handled = true;
return;
}

        base.OnKeyDown(e);
    }

the condition never calls.
Please suggest any solution

Matt Lacey
@mrlacey
@jinyafeng Those look like errors from Visual Studio itself. You can ignore them, especially as you don't have any XAML in your extension. I've talked about this with people on the XAML team and they've said they're working to address them but I don't know what priority these have, especially as they're not responsible for the people building the parts of VS that cause these errors.
1 reply
Aleksandr
@aldanchenko

Hi all 👋

I'm trying to configure my TreeView to look like VS tree's, but no success. Especially ugly it seen in dark mode. I seen similar questions before, but for now no success.

I will be glad for any help!

Thanks!

Dmitry
@helviett
Hello silent community! Does anybody know how to pack resources folder with dll to mpack package with vstool?
Ramon Viladomat
@Viladoman
Hi Community! Does anybody know who to trigger a build programmatically for CMake projects? Solution.SolutionBuild.Build(); throws and buildManager.StartSimpleUpdateSolutionConfiguration(...) fails. If someone can help me reproduce the same effect as 'Build All - F7' command under Build on CMake projects I would really appreciate it. Thanks!
Ramon Viladomat
@Viladoman
Found a way: DTE.ExecuteCommand("Build.BuildSolution"); Sadly, just discovered that CMake projects also don't trigger any build events. :(
It looks like CMake projects and VS SDK are not friends, unless I am missing something big.
Dan O'Brien
@InTheCloudDan
Ken Domino
@kaby76
@InTheCloudDan Yes, the Foo language example is okay. But, when I looked at it over a year ago, I had no idea how to use the example because the instructions are not that good: you don't need "Visual Studio 2017 Preview Channel" or "Language Server Protocol Client Preview" with VS2019 (16.8.3)! So, here's what I recommend on how to use it: clone the repo, open MockLanguage.sln, and build. I had to close and reopen the .sln twice to get a clean build with just a few warnings in VS2019. Set the default project to MockLanguageExtension, run, the "continue without code ->". To run the client/server, setting a breakpoint in FooLanguageClient.cs line 68 for the client, then open file "test.foo" in one of the subdirectories. The server is a Windows app that opens up. To send an LSP diagnostics notification from the server to client, click the Messaging tab in the server app, enter "hi there", then click on Show Message. The client will then display the message. To debug the server, you will need to start a second VS2019, then attach a debugger to the server process LanguageServerWithUI. Overall, the server (in LanguageServerTarget.cs) has only a few of the LSP calls implemented, but it'll get you started. NB, the protocol API (https://www.nuget.org/packages/Microsoft.VisualStudio.LanguageServer.Protocol/) is behind version 3.16 of the protocol. To get the server to work with VSCode, which is up-to-date with LSP 3.16, I had to re-implement the entire protocol types API (https://www.nuget.org/packages/LspTypes/). The LSP client in VS2019 does not implement semantic highlighting (colorizing of text), which is considered basic functionality of any LSP client/server. Presumably, you will want to implement much more than what LSP provides in your server. For whatever is missing, you can add your own LSP messages to augment missing features. Obviously, you don't want to implement the server as a Windows app; I implemented it as a Win5 console app. On the LSP client (https://www.nuget.org/packages/Microsoft.VisualStudio.LanguageServer.Client/) : the version seems to be tied to the version of VS2019 (e.g., 16.8.146 with VS2019 16.8.x). I have one bug report for my extension where the newer client does not work with a previous release of VS2019 16.5. I haven't resolved this. Good luck with you coding. --Ken Domino
2 replies
Sergey M
@usysware
Does anybody know how to access C# 9 records code model information via EnvDTE? From what I'm seeing records aren't even showing up in the file code model. Thanks in advance.
CyrusNajmabadi
@CyrusNajmabadi
we're not supporting code model anymore for new language constructs
Recommended approach now @usysware is to just use the roslyn apis directly.
Sergey M
@usysware

Recommended approach now @usysware is to just use the roslyn apis directly.

Correct me if I'm wrong please, Roslyn is available for C# and VB only but not C++. My extension supports all these 3 main languages supported by VS - C#, VB and C++. Sounds like I'd have to continue using file code model for C++ but switch over to Roslyn for C#/VB and recode existing code model support. If so, that totally blows.

CyrusNajmabadi
@CyrusNajmabadi
Right. But c++ doesn't have records. So your need there doesn't apply.
As mentioned above, we are just not continuing support there.
Code model has a ton of problems and issues that make it non viable
Least if which (but still very impactful), that it's an in proc, ui thread affinitized, chatty api
So it massively degrades vs performance.
Sergey M
@usysware

Yeah, threading and performance issues I'm well aware of regarding file code model unfortunately. It's definitely not the prettiest aspect of file code model to deal with.

Right. But c++ doesn't have records. So your need there doesn't apply.

I disagree. What I was bringing up there is that I have 1 and consistent way of presenting the code model to the user for all 3 major in-the-box VS versions languages. With this new change for my extension to move forward I'd have to still continue using file code model for C++ projects but switch over to Roslyn for C#/VB. No matter how you slice it, it's gonna be 2 classes that produce similar outcome to maintain now, and as you pointed out one that has threading implications and one that doesn't. That's the most troubling part for me and is gonna be a cluster/f. Now, if there was Roslyn for C++ I wouldn't be airing it here. Alternatively, I'd have to drop C++ support, which my users aren't gonna be happy about.

CyrusNajmabadi
@CyrusNajmabadi
You can ask c++ for a better api :-)
Sergey M
@usysware

You can ask c++ for a better api :-)

Asking for it is ultimately about a very long term solution. It won't help me any time soon.

Robert van der Hulst
@RobertvanderHulst
We are looking into the problem that despite the fact that we are passing the -m:4 command line option to MsBuild or despite the fact that we set the option in VS to build in parallel, the builds for our custom language are done in sequence and not parallel. We compared the our targets files with the C# targets files and we have even added <BuildInParallel>true</BuildInParallel> to the targets file that all of our projects import. But nothing seems to make a difference
Does anybody know what else we need to do to enable parallel builds. Is MsBuild looking for something else that we are not aware of ?
bluetarpmedia
@bluetarpmedia
@RobertvanderHulst Just checking, you intend to build multiple projects in parallel, right? (As opposed to multiple source files within a single project.) Do the projects have any dependencies that would force the build to be serialized? And have you tried -v:diag to see if there's anything in the logs?
Dmitry
@helviett
Hello! What is the best place to store extension data which can be modified? E.g. authenticated user token?
2 replies
kent7301
@kent7301
Hello
Robert van der Hulst
@RobertvanderHulst
@bluetarpmedia, yes, I want to build multiple projects in parallel. I have a root project that obviously needs to be compiled first, but then there are several other projects that only depend on the root project and on framework assemblies. I would expect these other projects to build in parallel. But they don't. They also build in sequence.
4 replies
bluetarpmedia
@bluetarpmedia
Jerry
@solvingj
Is it possible for a custom Inline MSBuild task to update values of common variables such as AdditionalIncludeDirectories programatically , AND have them be reflected in Visual Studio property pages. I'm trying to leverage the information here but am still failing to get the results: https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#targets-that-run-during-design-time-builds
Indu Prakash
@iprak
Is there a programmatic way to disable an extension? Vsixinstaller allows uninstalling but not disabling.
bluetarpmedia
@bluetarpmedia
@iprak You could programmatically modify the Registry (hive for VS 2017+). See under here: HKEY_LOCAL_MACHINE\ (hive file) \Software\Microsoft\VisualStudio\ (Version) \ExtensionManager\EnabledExtensions
Yann Duran
@yannduran
@iprak in my extensions I use a setting (ExtensionNameEnabled) in an options page in the extension itself, that's controlled in the options page. then in each button etc, I check to see if the ExtensionNameEnabled setting is false, and exit without doing anything. see the source code in Start Page+ GitHub repo if you want to see how I do it
Aleksandr
@aldanchenko

Hi,

Maybe someone know how to configure ToolWindow search view? I added search as described here https://docs.microsoft.com/en-us/visualstudio/extensibility/adding-search-to-a-tool-window?view=vs-2019. Is it possible to change (customize) something? Thanks!

Kaveesh Dashora
@kaveeshd
I recently added the implementation of Debug Engine in my Custom Project. Everything works fine. However, there is one issue which I am not able to understand why it is happening. Even after the project is in an attached mode and the debugger is running, the Start button changes to Attach and does not change to Continue. Any pointers as to why it could be happening?
Indu Prakash
@iprak
@bluetarpmedia It seems that ExtensionManager\EnabledExtensions only contains custom extensions and not the stock ones. I did not see any such setting in the 16.0.._Config\ExtensionManager node.
2 replies
Erik Ejlskov Jensen
@ErikEJ

I am getting this warning with all the latest package references:
WARNING: NU1603: Microsoft.VisualStudio.Data.Framework 16.7.30328.74 depends on Microsoft.VisualStudio.Shell.Interop (>= 7.10.6073) but Microsoft.VisualStudio.Shell.Interop 7.10.6073 was not found. An approximate best match of Microsoft.VisualStudio.Shell.Interop 16.7.30328.74 was resolved.

Should the dependency be updated?

1 reply
Yann Duran
@yannduran

@ErikEJ i don't bother adding individual SDK packages anymore. I just install the Microsoft.VisualStudio.SDK nuget package (or an earlier version of it depending on requirements)

it greatly simplifies the whole SDK experience, and you never have to worry about individual package dependency versions again. it covers all the main packages that you'd normally need.

you can still individually add anything that isn't included in the SDK nuget package

Erik Ejlskov Jensen
@ErikEJ
@yannduran Thanks, but that meta package does not include Microsoft.VisualStudio.Data.Framework!
Mathias Lykkegaard Lorenzen
@ffMathy

Is there a way to make my IGlyphFactoryProvider put its glyphs next to and not on top of or below the breakpoint glyphs?

I know DotCover does this, but I am unsure how. Can I somehow reserve a separate vertical column for my own glyphs?

Kaveesh Dashora
@kaveeshd
I recently added the implementation of Debug Engine in my Custom Project. Everything works fine. However, there is one issue which I am not able to understand why it is happening. Even after the project is in an attached mode and the debugger is running, the Start button changes to Attach and does not change to Continue. Any pointers as to why it could be happening?
IL HWAN, JEONG
@isadrastea
Does anyone have an example written in ATL/C++ related to the options page?
Matt Lacey
@mrlacey
Has anyone else tried using CodeQL analysis on a GitHub repository hosting (an) extension(s)? Mine has just started failing due to what looks like the image no longer having the VSSDK workload. Anyone else?