I am so confused.. I am trying to install a nuget package that has a dependency on .NetStandard v2.0, after reading this post about it, it made sense to me that I could run any library that is dependent on .NetStandard 2.0 with .Net 4.7.2. Unfortunately, while trying to install a nuget package, it fails, saying it is not compatible with .net 4.7.2.
I am mainly trying to add the new Roslyn libraries Microsft.CodeAnalysis and if you look at the dependencies it says it supports .Net 4.7.2, the issue seems to stem from another dll its dependent on Microsoft.CodeAnalysis.CSharp.Workspaces
, as that says it only has a dependency on .NetStandard 2.0. (but really .Net 4.7.2 can run .NetStandard 2.0)
Does anyone know if this is possible or will I be needing to move to .net core framework to be able to support a project like this?
Really it should say it only has a dependency on .NetStandard 2.0 but be able to get installed onto a target framework with 4.7.2 or .Net Core
Edit:
Using Visual Studio 2015 and C#6.
Its a rehosted windows workflow designer application (working on c# compilation/intellisense for inputs to the designer)
Thanks to @IanKemp for finding an answer that helped me, I will flag this post as a duplicate but I wanted to first post a step-by-step fix for future developers that may come across this.
So I downloaded the latest Nuget version (VS 2015 VSIX - latest v3.6.0) here
Then I tried to update to the latest Roslyn package via NuGet package mananger and got this error message:
The message points you to this link, that will download the .Net Standard Build Support extension: https://aka.ms/netstandard-build-support-netfx
I then tried to update to the latest Roslyn package and it all worked!!
Happy coding all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With