I have deployed my app on a production machine. I am publishing Release, win-x64 and --self-contained true. I have installed .net core 3.1.7 restarted the VPS and I am getting:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
dotnet --info
returns:
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
Host (useful for support):
Version: 3.1.7
Commit: fcfdef8d6b
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
my .csproj file is the following
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PropertyGroup>
Anyone knows why am I getting this error?
From my end, I was facing this issue when trying to start IIS server on my local machine. I downloaded .NET Core 3.1 SDK and the problem is now solved.
Try to add this in your .csproj
file:
<PropertyGroup>
<RollForward>Major</RollForward>
</PropertyGroup>
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