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

Could not load file or assembly 'Microsoft.Build' on Fedora #1852

Closed
martinellison opened this issue Nov 10, 2017 · 3 comments
Closed

Could not load file or assembly 'Microsoft.Build' on Fedora #1852

martinellison opened this issue Nov 10, 2017 · 3 comments

Comments

@martinellison
Copy link

martinellison commented Nov 10, 2017

Environment data

dotnet --info output:
~/jigsaw/git/main fixes> dotnet --info

.NET Command Line Tools (2.0.2)

Product Information:
 Version:            2.0.2
 Commit SHA-1 hash:  a04b4bf512

Runtime Environment:
 OS Name:     fedora
 OS Version:  26
 OS Platform: Linux
 RID:         fedora.26-x64
 Base Path:   /usr/share/dotnet/sdk/2.0.2/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

VS Code version:
Version 1.17.2
Commit b813d12980308015bcd2b3a2f6efa5c810c33ba5
Date 2017-10-16T13:57:00.652Z
Shell 1.7.7
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
C# Extension version:
1.13.0 (November 7, 2017)

Steps to reproduce

Load C# project

uname -a
Linux xiaosan 4.13.10-200.fc26.x86_64 #1 SMP Fri Oct 27 15:34:40 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Expected behavior

OmniSharp works

Actual behavior

OmniSharp does not work at all

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at OmniSharp.MSBuild.MSBuildProjectSystem.LoadProject (System.String projectFilePath) [0x00038] in :0

Notes

  • It was working yesterday.
  • I have tried the tintoy package but it did not help (same output)
@DustinCampbell
Copy link
Member

Hi @martinellison -- you have Mono 5.4 installed into Fedora 26, correct? If so, OmniSharp will attempt to use Mono's msbuild. Unfortunately, that is not included in the mono-complete or mono-devel packages. However, you should be able to install it with sudo yum install msbuild. That should get OmniSharp working again.

Note: The FileNotFoundException for Microsoft.Build was fixed earlier today with OmniSharp/omnisharp-roslyn#1016. That should make its way into a new update to C# for VS Code in the next couple of days.

@DustinCampbell DustinCampbell changed the title Could not load file or assembly ''Microsoft.Build Could not load file or assembly 'Microsoft.Build' on Fedora Nov 10, 2017
@martinellison
Copy link
Author

martinellison commented Nov 10, 2017 via email

@DustinCampbell
Copy link
Member

Great! Thanks!

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