-
Notifications
You must be signed in to change notification settings - Fork 16
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
"Unexpected error loading file <pathTo>.csproj" : "Could not load file or assembly" : 8.0 Preview #60
Comments
As a general rule I've found that SDKs using newer versions of the runtime than the version that the language server was built against don't really work correctly. It's a side-effect of us having to load and use the MSBuild library from the target version of the SDK (which was built against a newer version of the runtime than the one running the language-server host. |
The oddity though is that it DOES work when it is just 8.0. EDIT0: Yeah, it's something to do with 8.0 being side-by-side with any other sdk: |
Yeah that is pretty odd; there are environment variables you can set (see MSBuild unit tests) that may help with additional diagnostics... |
I was going to ask for more guidance relating to the "unit tests" env vars before coming across some more findings. First was how vscode didn't use the .bashrc/.profile env vars when launched from KDE's launcher. I couldn't run the
... except the path DOES exist:
... so I tried in the terminal using Running "Launch Extension" opens a new window and automatically starts downloading 6.0 which I didn't want to happen since I already have it installed, so I closed that. I don't know if you can point me a little more directly to where I should be looking/trying with regard to the "env vars" for "MSBuild unit tests". EDIT0:
... but it is left with EDIT1:
... and still have no LSP nor MPT output. |
Sorry, am away for the weekend or I'd have sent you a link to the code 🙂 I'll have a look for the code in question when I get home tomorrow afternoon. |
(see line 66) |
Thanks, I was hopeful, but setting
Since you showed me that one, I hunted for other Hmm, it may not be all that helpful though. The main messaging looks to be the same at the end, and all of the stuff before it just leads up to it, but shows it's finding the
No rush or anything. Truly, enjoy your weekend. I'll hear from ya when I hear from ya, and I don't want to hear from ya when you should be enjoying your weekend. |
@vindicatorr Can you please check this on a GA version of .NET 8? I have .NET 6, 7 and 8 currently installed side by side and the error is gone. If the issue is resolved for you as well, we can close this issue |
Same here. Just updated to the final 8.0 release (alongside the other sdk versions) and encountered my other issue referenced above, updated vscode-csharp, and everything's looking good again. |
This issue has me completely vexxed...
I had copied the 8.0 preview sdk files to my dotnet folder
/opt/dotnet/
, and saw this extension no longer giving me autocompletion.For a sanity-check, I:
$ find /opt/dotnet -name "*7.0*"
) from the dotnet path (but NOT removing 7.0 references found in the 8.0 sdk) (this worked)So it's like there's some conflict having 7.0 and 8.0 sdks together which makes no sense.
MSBuild Language Server
Failing:
Working:
The text was updated successfully, but these errors were encountered: