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
you might only get that if you start with an analyzer project, which should add the appropriate analyser and add a vsix project and an analyser project if i remember correctly
i think you may have created confusion by not creating an analyzer project to start with
Paul M Cohen
@paul1956
I am fixing standard VS errors so I don't have or need an Analyzer.
I do have codeFixes and CodeRefactoring's
Yann Duran
@yannduran
but you said you're creating/adding a Diagnostic no?
analysers, and an analyser project are two different things. an analyser project will end up being installed under the Analyzers node
in an anlyzer project you can add disgnositcs and code fixes which both show up in the lightbulb
Paul M Cohen
@paul1956
Hopefully I created an analyzer project, how do I know?
image.png
Looks like an AnalyzerProject with the code fixes. This is not mine, it is the default. Mine is on GitHub.
Joseph Musser
@jnm2
@paul1956 Did you try the start menu "Reset the VS experimental instance" shortcut?
IIRC, once you F5 debug in the experimental instance without any code fix providers, VS remembers that there are no code fix providers and doesn't look for any after that even if you add them. I don't know if this is true, but I have run into what looks like it pretty consistently.
Resetting always fixes it for me.
Paul M Cohen
@paul1956
where not showing up in search, also which experiential instance get reset? All?
Joseph Musser
@jnm2
@paul1956 This is what it looks like:
image.png
I type exp to find it. There is a separate entry for each installation of VS, and it only resets the experimental hive for the installation of VS that the start menu entry mentions.
Paul M Cohen
@paul1956
I was looking in Visual Studio not Windows search
Found it
Thanks
Savo Pejović
@SavoInfostream
Hello everyone,
I am interested in creating an extension that would make the editor treat content of some C# string as if it's C# code, i.e. highlighting and autocomplete. I believe projection buffers could be the way to do it by using the original C# file except the string as one source buffer, and using string wrapped in some code block in as another.
Is this doable ?
Paul M Cohen
@paul1956
@SavoInfostream that would be very useful for writing tests.
Paul M Cohen
@paul1956
image.png
Has anyone seen when you run a VSIX, you can't set a breakpoint. I see the latest version under Manage Extensions and I have reset Experimental instance.
Yann Duran
@yannduran
@paul1956
  1. Make sure that the Debug properties are set
  2. Make sure that you haven't accidentally left the configuration set to Release
Paul M Cohen
@paul1956
Yes, Yes I added a throw to the start of the code and its never hit. I am missing something basic it the VSIX project. All I did was add a reference to my code fix.
Savo Pejović
@SavoInfostream
Could someone tell me how to change TextBuffer of a file? Using IVsTextView from IVsTextViewCreationListener didn't have effect, as far as I can see.
Paul M Cohen
@paul1956

Trying to run a VSIX and it gets exception

System.IO.FileNotFoundException : Could not load file or assembly 'System.Collections.Immutable, Version=1.2.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at async VBRefactorings.Style.ByValCodeRefactoringProvider.VB$StateMachine_4_ComputeRefactoringsAsync(<Unknown Parameters>)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at VBRefactorings.Style.ByValCodeRefactoringProvider.ComputeRefactoringsAsync(CodeRefactoringContext context)
   at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)

I use "System.Collections.Immutable": "1.7.1"
```

Matt Lacey
@mrlacey
@paul1956 I've had issues in the past where I had a release version in use by the experimental instance and it stopped deploying the debug version when I made changes. Incrementing the version number of the extension forced a new debug deployment to the experimental instance.
Paul M Cohen
@paul1956
image.png
When I look at appdata/local/Microsoft/VisualStudio I see a lot of Directories. When I reset Exp Instance using the program what comes with VS the last 2 directories above get deleted and recreated. but there are a lot of Roslyn directories and they are being used. I assume something in my Debug settings is old and wrong. Can I delete all the Roslyn Directories and then change something to use the new Exp directories. There are 2 because one is preview and the other is release.
Robert van der Hulst
@RobertvanderHulst
I think you can delete all the Exp and Roslyn folders. VS will recreate them when building and deploying extensions.
Paul M Cohen
@paul1956
@RobertvanderHulst thanks
Paul M Cohen
@paul1956
@mrlacey didn't help nor did resetting Experiential instance
Paul M Cohen
@paul1956
Has anyone seen this in Microsoft Visual Studio Community 2019 Preview Version 16.7.0 Preview 6.0
image.png
Alfonso Vargas
@alfonsocid
image.png
Hi guys! Is possible modify this windows with an extension?
And create an option
Nikolay Mishev
@NikolayMishev
Hi guys we are developing Item templates for ASP.NET Core Web application projects and we are having issues showing the item template for this type of project. Can anyone tell us what we are missing. Here is some details of what we are doing:
  • In the .vstemplate we have <ProjectType>CSharp</ProjectType> and <TemplateGroupID>AspNetCore</TemplateGroupID>
  • The path to the Item template in the .vsix is IT\AspNetCore\Web\ASP.NET\<itemTemplatename>.zip\<itemTemplatename>.vstemplate
sheffer21
@sheffer21
Hi, we have a strange bug in LSP extension. Sometimes When we open a document with existing diagnostics the diagnostics only appear on the error pane but with no squiggly line in the editor. If we edit the file after we can see the squiggly line
image.png
Mads Kristensen
@madskristensen
Tomorrow, Friday at 2pm Pacific time, I'll be premiering the first Writing Visual Studio extensions with Mads live stream on both YouTube and Twitch. It's a weekly show of me coding various extensions related things. I hope you tune in https://www.youtube.com/watch?v=tU5ayB6jdK8
Alexander Gayko
@AdmiralSnyder
@olegtk hey, sorry for the late reply. i had to ask a coworker what the reason was why i asked for extensibility of GoTo and VS search. the answer was (we think) that we wanted to be able to search for resources (resx file entries) by a) their name and b) their content
Paul M Cohen
@paul1956
Can you have more then 1 Code Fix/Code Analyzer/Code Refactoring in a single Project inside a VSIX? I Added a new VSIX project with the Asset list below but it only finds 1 Code Refactoring, no Analyzers and no Code Fixes.
    <Assets>
        <Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="VBRefactorings" Path="|VBRefactorings|" />
        <Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="VBRefactorings" Path="|VBRefactorings|" />
    </Assets>
Yann Duran
@yannduran
@paul1956 yes you can - the Roslynator extension has dozens of them
Paul M Cohen
@paul1956
@yannduran I am missing something I set breakpoints in every function and I only hit one refactoring, no code fixes and no Analyzers. I have to be missing something obvious.
rhodosaur
@rhodosaur
Has anyone noticed intellisense issues with 16.7? I'm getting incorrect suggestions on certain overload combinations, specifically with generic/non-generic extension methods and lambdas
rhodosaur
@rhodosaur
Example here: https://pastebin.com/KEsfE3sh. Anyone able to reproduce that?
Momchil Stefanov
@momchilstefanov
@madskristensen That was great stream! I'm very excited that there will be such video every week! Very interesting and usefull! Thank you! :)