-
Notifications
You must be signed in to change notification settings - Fork 677
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
VSCode .Net Core MVC reports problems but Project Builds and Runs just fine #4134
Comments
I'm running into this same issue as well (also on macOS 10.15.7). Omnisharp Logs... Razor Fail:
Host Exception
|
I think the problem is that the global mono is not compatible with the omnisharp that is embedded in the C# extension version 1.23.4. Even if you have the latest stable 6.12.0.90 mono from https://www.mono-project.com/download/stable/, it doesn't work with this version of omnisharp. The good news is that the extension has its own embedded mono runtime and dependencies. Uninstalling the global mono or setting the UseGlobalMono option for vscode in settings.json to "never" resolves the problem. {
"omnisharp.useGlobalMono": "never"
} I did some spelunking and while the mono binary that is embedded in the extension is 6.12.0.90, the msbuild engine is actually a preview that is 2 point releases newer than what is in the stable mono distribution. There may be other differences. See also #4123 (comment) |
Please set
From the next version of the extension this will be the default option again (#4130) With regards to Mono that is compatible with 3.1.402 SDK and .NET 5.0, see (and upvote) this issue mono/mono#20250 (comment). Without it there is not much else we can do to make global Mono work - in fact we manually build our own embedded Mono runtime that allows us to work around that. |
@Cooksauce the Razor exception is something else, could you please open a new issue for this |
Please paste the output from your clipboard## Issue Description ##
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.50.1
C# Extension: 1.23.4
Mono Information
OmniSharp using global mono :6.4.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.402 Commit: 9b5de826fdRuntime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.402/
Host (useful for support):
Version: 3.1.8
Commit: 9c1330dedd
.NET Core SDKs installed:
3.0.100 [/usr/local/share/dotnet/sdk]
3.1.402 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
These errors just started yesteday. Before this everything was fine.
To troubleshoot the issue, I created a new .Net Core MVC project using dotnet new mvc. I opened the project in vscode with no modifications. VSCode n OSX immediately showed the errors/problems. I opened this new project in VSCode on Windows. No errors.
On VSCode OSX I removed the C# extension and the errors disappeared. I reinstalled the C# extension and the errors returned.
Images showing issue
This only occurs in VSCode on OSX. VSCode on Windows does not exhibit this issue.
The text was updated successfully, but these errors were encountered: