Omnisharp-vscode: .NET Core SDK 2.0 Preview 2 projects are not processed properly on OSX/Linux

Created on 13 Jun 2017  路  1Comment  路  Source: OmniSharp/omnisharp-vscode

The latest candidate builds of .NET Core SDK 2.0 Preview 2 do not work with the latest v1.11.0-beta3 of C# for VS Code. The issue boils down to a bug in Mono's new "strict" assembly loader. A pull request is already out to fix the Mono issue. I'll use this issue to track flowing that fix back into C# for VS Code.

Note: This is only an issue for C# for VS Code on OSX/Linux. The v1.11.0-beta3 release should work properly for Windows. Follow the steps at "Installing Beta Releases" to install the beta if you are looking for support on Windows.

Details:
OmniSharp causes NuGet.Frameworks, 4.0.0.0 early during start up (when the project.json project system initializes). When MSBuild runs on a project in OmniSharp it runs several tasks from Microsoft.NET.Build.Tasks. With more recent builds of .NET Core SDK 2.0 Preview 2, these tasks call into NuGet.ProjectModel, 4.3.0.3 (example) which references NuGet.Frameworks, 4.3.0.3. The two versions of NuGet.Frameworks _should_ be loaded SxS by the runtime. However, the Mono runtime sees that NuGet.Frameworks, 4.0.0.0 is already loaded and uses that rather than load the correct version SxS. Then, an exception is thrown when NuGet.ProjectModel tries to access a type in NuGet.Frameworks, 4.3.0.3 that isn't present in NuGet.Frameworks, 4.0.0.0. The Mono strict assembly _should_ see that the versions do not match and probe to see if it can find the correct version. A pull request is already out to fix the Mono runtime bug.

Bug Resolved-Fixed

Most helpful comment

The latest beta (v1.11.0-beta4) fixes this issue.

>All comments

The latest beta (v1.11.0-beta4) fixes this issue.

Was this page helpful?
0 / 5 - 0 ratings