-
Notifications
You must be signed in to change notification settings - Fork 416
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, Version=15.1.0.0' #2174
Comments
A relevant detail I got from the OmniSharp log is that you appear to have Visual Studio 2019 installed, which I would have expected to take care of all msbuild requirements |
Can you share the repro project? |
Yes and I have no issue with building the project with Visual Studio 2019. I must say that the project does have particular setup with some dlls found in some custom directories. Tell me if there's anything I can do to provide more information...
I'm sorry, I can't. Unfortunately, the project is proprietary. |
I see that omnisharp lists places where it finds MSBuild DLLs:
Is it possible to give omnisharp a list of directory where it can look for DLLs ? I have a bunch of places where the file may be so if I could add directories for omnisharp to look for, then it could may be fix my issue? |
@sim590 you'll get a lot more detail about what omnisharp-roslyn is doing, and where it's currently looking for DLLs, if you enable debug logging. Do this by passing the let g:OmniSharp_loglevel = 'debug' As for configuring DLL locations, the various omnisharp-roslyn configuration options are described in this wiki article: Configuration Options. However, as far as I know these options are for locating MSBuild and associated runtime/sdk DLLs, and not for project references. @filipw may be able to confirm whether this is correct. |
I've searched for
I put the results in this file: msbuild-15.1.0.0-references.txt Is there something that comes out of the ordinary? May be I have some settings that omnisharp-roslyn picks up here while I wouldn't want it for compiling my project. I got some info from my coworkers that we don't really use specifically I have upgraded Visual Studio 2019 and I don't have it listing the assembly version 15.1.0.0 anymore:
I'm not sure if it's worth something to bring that up, but in any case. |
I have found that Visual Studio config files have some relative paths for referencing I suspect that this does not play nice with Omnisharp or Omnisharp on WSL2. I currently use @nickspoons' suggestion for making Omnisharp-vim work under WSL2: OmniSharp/omnisharp-vim#706 (comment) @nickspoons: could the working directory be altered at some point for Omnisharp (or one of its subprocess) so that this could happen? |
As I have described here I'm having errors when trying to run
omnisharp-roslyn
on my project. Here is the log file:omnisharp-roslyn.log
It has been 'anonymized'. I hope it is fine. Also, error messages are in french. I don't know how I can change them, sorry.
The project failing to load is configured for the .NET framework 4.8. When running, the following:
I am getting the following result:
The assembly should be there no? I may have also run:
However, it did not change anything.
I ran the following inside the directory containing the
csproj
of the project I'm trying to open and got:I hope we can help me debug this.
Also
I have tried a few steps mentioned on my omnisharp-vim ticket.
I'm not sure if I'm on the right track or what I'm missing. I would really appreciate help on this.
The text was updated successfully, but these errors were encountered: