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

Add option to disable "some projects had problem opening" warning popup #2110

Closed
johnkors opened this issue Mar 14, 2018 · 15 comments
Closed

Comments

@johnkors
Copy link

In the latest version of VS Code, where the alerts are shown in the bottom right, I seem to get a stupid amount of these during a re-build.

"Some projects have trouble loading. Please review the output for more details."
"Some projects have trouble loading. Please review the output for more details."
"Some projects have trouble loading. Please review the output for more details."
.
.
.
.
Did we have a way of disabling this message? It's showing 10 times during a build, and it's annoying the life out of me.

It's trying to warn me about using 4.6.1 references in a netcoreapp2 project (which I know might blow up, but I'm aware of the consequences and what I'm doing here).

[warn]: OmniSharp.MSBuild.ProjectLoader
        Package 'FluentMigrator.Runner 1.6.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.

Any way I can either disable all omnisharp popups or this ProjectLoader WARN in particular?

@rchande
Copy link

rchande commented Mar 14, 2018

@johnkors This is a good feature request--thanks for filing.

@rchande rchande changed the title "Some projects have trouble loading. Please review the output for more details." Add option to disable "some projects had problem opening" warning popup Mar 14, 2018
@johnkors
Copy link
Author

Can I ask in general - why are many of these OmniSharp WARNs turning into a pop-up? Pop-ups are so intrusive in the UI. In full blown Visual Studio they are kept in the debug log/ error log, which one can look into if one wants.

@rchande
Copy link

rchande commented Mar 15, 2018

@johnkors There were no changes in the extension. VS Code changed how they display notifications (https://code.visualstudio.com/updates/v1_21#_new-notifications-ui). I would recommend filing bugs in their repo with feedback.

@johnkors
Copy link
Author

Right, it changed from the top center, to bottom right. But it's still OmniSharp triggering the pop-ups.

@JohnAnthony
Copy link

The Visual Studio Code guys blame OmniSharp, and the OmniSharp guys blame Visual Studio Code.

microsoft/vscode#22702

@DustinCampbell
Copy link
Member

@JohnAnthony : It's not about blame -- it's about bugs getting to the right people. The issue you linked is clearly a situation where an issue was filed on the main VS Code repo that was clearly meant for the C# extension for VS Code.

@johnkors : In the meantime, did you know that a single ESC key press can dismiss all of the popups?

@JohnAnthony
Copy link

JohnAnthony commented Mar 29, 2018

@DustinCampbell I mean "blame" in the purely clinical sense. In the sense that one project has to be to blame, and we need to know which to correctly report this bug. @rchande has left directions to another project, but that project redirects back here.

As far as I can tell, suppressDotnetInstallWarning is being passed into src/coreclr-debug/activate.ts in the plugin (powered by OmniSharp) but is being ignored. The pop-up behaviour is questionable, but I believe the bug is here.

@rchande
Copy link

rchande commented Mar 29, 2018

@JohnAnthony There are 2 separate complaints being discussed here. One belongs to omnisharp and one to vscode:

  • OmniSharp displays many notifications about warnings encountered while loading a project
  • VS Code notifications moved to a new location

For discussion of the particular notifications displayed by omnisharp, we're happy to take feedback and make changes accordingly. However, we don't have much control over the VS Code notification UX. Feedback on how that UX looks and where it appears/how large it is should go in the VS Code repo.

Sorry for any confusion!

@johnkors
Copy link
Author

@rchande Sorry if this was unclear in my OP, but this issue is not with the location of the pop-up. It's with the pop-ups presence in the first place. I don´t care it was moved from top center to bottom right. I care with the frequence of which I have to hit ESC to get rid of pop-ups that really are build/restore WARNs. This WARN msg could easily have been put into the build log instead of a pop-up, similarly to what VS does.

@DustinCampbell Yeah, I'm aware of ESC closing pop-ups. I just don't get why OmniSharp has to push this in my face. Or why I need to hit ESC this often at all.

This is the second issue I've raised with OmniSharp pushing pop-ups in VS Code for no real good reason (imo). Am I really the only one finding pop-ups as a concept of feedback really intrusive? A pop-up should be last resort imo (ERROR/FATAL).

@DustinCampbell
Copy link
Member

@johnkors: A big part of the problem here is that there's no way to really tell whether a warning or error that occurs during project load is fatal or not. I agree that it's probably OK to provide an option to disable this particular popup. However, setting that can hide the popup in cases where it's more meaningful for you. In that scenario, you might find (for example) that IntelliSense simply stops working, leaving you scratching your head.

@JohnAnthony
Copy link

@DustinCampbell My issue is the same as @johnkors. The decision to allow suppression of these messages seems to have already been made; we previously had means to disable these warnings/errors.

The title is worded as a feature request, but I believe this is a mistake. This should be a bug report for existing behaviour that has regressed.

@DustinCampbell
Copy link
Member

DustinCampbell commented Apr 5, 2018

@JohnAnthony: We're talking about different messages here.

There is an existing suppressDotnetRestoreNotification which suppresses messages that we display when your project changes in such a way that dotnet restore needs to run -- e.g. because you add a package reference to a project file or run git clean -xdf at the command line.

This issue is around the Some projects have trouble loading. Please review the output for more details. message that is display when MSBuild reports a warning or error when loading a project. There is no option to disable this. So, this issue tracks the feature request to add one.

@johnkors
Copy link
Author

johnkors commented Apr 5, 2018

Thanks for explaining, @DustinCampbell . I get why you'd want to default to showing messsages as clear as possible to the user. So, when you don't know what the loglevel of the message is - you default to a pop-up, if I understood you correctly.

Personally, I prefer to get feedback in the "Problems" / "Output" sections of VS Code than something I have to focus with a mouse, then click ESC.

Maybe it could be a feature to select where to get these error messages?

omnisharp.feedback : "pop-up|output".

@tewarid
Copy link

tewarid commented Aug 28, 2018

For whoever lands here looking for an answer, add the following to user settings

"omnisharp.disableMSBuildDiagnosticWarning": true

@cchamberlain
Copy link

Thanks @tewarid this was driving me nuts with ~40 projects.

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

7 participants