I'm trying to install Nuget package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation on a .Net core 3.1 project and getting following error. "Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 5.0.0 is not compatible with netcoreapp3.1"
I have already updated all the existing packages but no luck. Has anyone encountered this error?
Because Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 5.0.0
depends on net5.0
.
You should install a version compatible with .net core 3.1
,like Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -Version 3.x
For me this one worked in the integrated VS terminal.
dotnet add package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation --version 3.1.10
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