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

Allow suppression of project load failures #7472

Open
estenio12 opened this issue Aug 26, 2024 · 3 comments
Open

Allow suppression of project load failures #7472

estenio12 opened this issue Aug 26, 2024 · 3 comments

Comments

@estenio12
Copy link

First I checked vscode to not show me notifications from the extension, but it still continued to appear; Then I went and marked it to not show any notification, only notifications from this extension are going over my configuration and showing the notification.

The big problem is when the extension detects a problem, and then starts reporting the same error over and over again.

Image showing any notification is turned off:
Erro C# extensions on VSCode

Image showing C# extension notification is turned off:
C# extensions on VSCode marked as off

Image showing my extension installed for C#:
My Extensions installed for C# workflow

@dibarbet
Copy link
Member

VSCode doesn't allow error messages to be hidden (intentional design decision on their side). I'm not 100% sure if it covers this case, but @estenio12 can you try enabling dotnet.server.suppressLspErrorToasts in VSCode settings to see if that suppresses the toast?

Just an FYI - the error you're seeing indicates there was an issue loading the project. If that error is present you may see limited language feature support for anything that is a part of that project.

@estenio12
Copy link
Author

estenio12 commented Aug 27, 2024

Hi @dibarbet!

I did what you recommended, but it didn't work. I checked the box and restarted vscode and it didn't work.

Image showed my setting:
Setting Vscode

Answering the question of explaining the problem you explained, what happens: The solution of this project has references from several other different projects, the configuration of task.json and launch.json are customized to execute only what I want to debug.

Maybe a solution for this problem is load sln of extension instead of using my custom launch.json, i will try latter.

@dibarbet
Copy link
Member

Got it, we'll see if we can do something to suppress the project load notifications as well. But it likely won't happen immediately.

There are also a couple things you can do if you want the C# extension to ignore certain aspects of the projects when loading them, for example

  1. Use a solution filter (slnf) to include only certain (working) projects (slnf files should be available in the 'Open Solution' command).
  2. Use MSBuild properties to control when certain things are run. For example if you don't want something to happen when the projected is loaded in VSCode for intellisense, you can condition it using the $(DesignTimeBuild) property (which is set to true when the C# extension is loading the project).

@dibarbet dibarbet changed the title The extension does not respect vscode configuration for notifications. Allow suppression of project load failures Sep 5, 2024
@dibarbet dibarbet added this to the Backlog milestone Sep 5, 2024
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

2 participants