-
Notifications
You must be signed in to change notification settings - Fork 417
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
VS 2019 Preview 16.6 not being picked over 16.5 causes issues with net5.0 #1783
Comments
OmniSharp will use msbuild from Visual Studio 2019 if it's found on your machine. is your VS2019 updated to handle |
I have VS 2019 16.5.4 installed (according to Visual Studio Installer). OmniSharp seems to be picking it up properly:
|
then everything should work - can you post the full log at debug level? |
Mmh, ordinarily I would, but there's thousands of lines of output and this is a private project, so I probably can't just post it as-is. Is there a particular subset of the log I should grab? By the way, I noticed that
Meanwhile
I don't know if that would make any difference, but it seems worth noting since |
you will have to provide a small repro of this and a log because otherwise it's unfortunately impossible to troubleshoot. |
mkdir test && cd test
dotnet new classlib -n lib -f net5.0
dotnet new wpf -n wpf
sed -i 's/netcoreapp5.0/net5.0/' wpf/wpf.csproj
dotnet add wpf reference lib
dotnet new sln
dotnet sln add lib
dotnet sln add wpf
dotnet build # Will work fine. Then open the folder in VS Code and you'll get the error I mentioned from OmniSharp. |
I see. the minimum VS to handle this is 16.6 Preview 2 |
I don't suppose it would be possible to make OmniSharp pick up the MSBuild that .NET Core ships with? |
you can do that by adding
|
Just out of curiosity, given the |
In any case, it seems that adding that setting to my project's |
Also, a minimal installation of VS 2019 Preview with just Roslyn + MSBuild results in:
Can I tell OmniSharp which one to use? I'd rather not have to uninstall the stable version of VS 2019. |
sorry, I thought you asked about how to use the SDK resolver that ships with dotnet SDK 🙈 however, 16.6 should be picked before 16.5 - it does so on my machine at least (and the sample you posted also works then), so looks like it's non deterministic. I will check that |
@filipw I am also having this issue with https://github.com/PowerShell/PowerShell project.
|
Using instructions at #1545 (comment), I inserted the following in {
"MSBuild": {
"MSBuildOverride": {
"MSBuildPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\MSBuild\\Current\\Bin",
"Name": "Overridden MSBuild"
}
}
} |
In a solution I'm working on, I have a WPF project which references a library project. Both are currently targeting
netcoreapp5.0
which works fine. If I change both to targetnet5.0
(the preferred TFM going forward), I get this error from OmniSharp:(Fwiw, I made absolutely sure there are no projects still using
netcoreapp5.0
in the solution.)The text was updated successfully, but these errors were encountered: