Open justinmchase opened 3 years ago
When I look for this file:
/Users/jchase24/.vscode/extensions/ms-dotnettools.csharp-1.23.5/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll
Which it says it cannot find, the file does in fact not exist. The file Microsoft.build.dll
does however exist in that same directory. I guess my question is, so what? Why should it generate a critical level log to output for a file which doesn't appear to be actually necessary, especially one with so little signal and a seemingly misleading message.
@justinmchase Sorry you are running into issues with SDK resolving. It is a frustrating issue.
The failure logging for Microsoft.Build.resources.dll
is not a real problem. To keep the size of the included MSBuild down, we do not include localization. This is reported as a failure because it probes for resources as part of assembly loading, but this does not change or break the behavior of MSBuild.
Because the SDKs were not installed with the official installers, it is possible there is some bit of environment setup breaking your experience. You could try enabling the LegacySdkResolver (see these instructions https://github.com/OmniSharp/omnisharp-roslyn/issues/1313#issuecomment-429039879) to see if that fixes your experience. If that does indeed resolve things for you, the omnisharp.json file can be moved to your home directory and will apply system wide.
I did try the LegacySdkResolver but it doesn't seem to fix it... And really its working fine its just that it keeps stealing focus. I don't care if it prints this stuff out it just needs to stop taking focus away. Every time I switch branches or change a file it seems to take focus away from my terminal and other panels.
I think that this line is a bug: https://github.com/OmniSharp/omnisharp-vscode/blob/master/src/observers/OmnisharpChannelObserver.ts#L16
Again, I think its fine that its printing this information out but I really don't think anything it can possibly print out warrants focus stealing.
I keep getting this error at an interval, I've spent way to long scanning through old bugs and trying things out. The plugin appears to be working fine and everything is building yet OmniSharp keeps emitting this error.
When this happens it changes focus from the terminal to the Output window. The fact that this is building correctly makes me think it's an error with omnisharp specifically, I have set the
$MSBuildSDKsPath
to the correct path, before I did that building wasn't working either, now building works but omnisharp (semi-)doesn't.Environment data
dotnet --info
output:VS Code version:
C# Extension version:
OmniSharp log
This is with log
level: critical
set:With
level:trace
set here is some additional logs which may be helpful:Steps to reproduce
Just opening visual studio code with a C# project in the opened folder produces this issue.
Expected behavior
Actual behavior
The error is displayed many times, each time it occurs focus is stolen from where you are typing and it switches to the output panel (true of the terminal panel at least).