Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add functions to get information about the open solution #6084

Closed
AndreyMoskalev565 opened this issue Aug 9, 2023 · 3 comments
Closed

Comments

@AndreyMoskalev565
Copy link

Add a command to get the path to the open solution, for example:

dotnet.getOpenSolutionPath

Also, commands to get the build platform and build configuration would be very useful:

  • dotnet.getBuildConfiguration;
  • dotnet.getBuildPlatform.

I am developing PVS-Studio extension for VSCode that will analyze projects. I want to use an open solution in the "C#" plugin as the analysis target. To start the analysis correctly, I need to get the build platform and build configuration.

Thank you in advance for your help!

@dibarbet
Copy link
Member

We definitely want to allow other extensions to pull data from the new language server, similar to O#. However we need to re-design the API because the underlying project representation is not the same. See #5805

I am developing PVS-Studio extension for VSCode that will analyze projects. I want to use an open solution in the "C#" plugin as the analysis target.

What kind of analysis do you want to do? Because Roslyn does support 3rd party analyzers that can analyze source code. These should already work if they're shipped as a nuget package and added to the project. See https://learn.microsoft.com/en-us/visualstudio/code-quality/roslyn-analyzers-overview?view=vs-2022

@jasonmalinowski
Copy link
Member

Indeed we do need a bit more information here to better understand this request. There are scenarios where we might have loaded many projects, but we have no solution path because the user has none. @AndreyMoskalev565 can you better describe what sort of analysis you're doing?

@dibarbet
Copy link
Member

Likely duplicate of dotnet/roslyn#68696
We plan to add extensibility points on the server side that will allow you to get information about the Roslyn workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants