ASP.NET CORE doesn't list all installed SDKs on Linux Ubuntu - asp.net-core

I recently installed three different SDK versions of ASP.NET CORE on my linux Ubuntu, i have projects with versions 2.2.207, 3.1.421 and 6.0.302, if i try to run these projects, all of then run correctly, but if i execute a command dotnet --list-sdks, it only list a 6.0.302 SDK, and if i try to create a new ASP.NET CORE project, it doesn't appear the 3.1 and 2.2 version, what can i do to list all SDKs versions?
I Installed these SDKs with dotnet-install.sh dotnetinstall scripts

Related

Is the .NET Core SDK required for runtime?

I am setting up a Ubuntu machine to deploy a Asp.Net MVC Core app according to the instructions here. In it, it asks for the .NET Core SDK to be installed.
If my server is meant to just run the web application, is it necessary to install the SDK?
Also, if my app is developed in .NET Core 3.0 in Visual Studio, is it ok to have it in a .NET Core 3.1 runtime?
Runtime will be enough to run deployed application https://dotnet.microsoft.com/download/dotnet-core/3.1
In fact you don't even have to do that. Because you can also Publish self-contained package
https://learn.microsoft.com/pl-pl/dotnet/core/deploying/#publish-self-contained
Which will carry all resources needed for runnint your applicaiton on target OS
v3.1 runtime should support your application built in v3.0
From docs;
Install the SDK (which includes the runtime) if you want to develop
.NET Core apps. Or, if you only need to run apps, install the runtime.
If you're installing the runtime, we suggest you install the ASP.NET
Core runtime, as it includes both .NET Core and ASP.NET Core runtimes.
So you do not have to install SDK if you only need to run apps.
You need to install same runtime version as your project (SDK) version

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies

I upgraded an existing application from asp.net core web API 2.0 to 3.1. When I run the application locally, application runs fine without any errors, but when I deployed the application to the same server where the 2.0 application was running, I got an error saying "ANCM failed to find Native dependencies".
Below is the screen shot:
From the provided link:
https://dotnet.microsoft.com/download/dotnet-core/3.1
I was able to find out that I need to install .net core 3.1. I am not sure if I need to install on my server:
ASP.NET Core Runtime 3.1.3
OR
SDK 3.1.201
I already have few 2.1 applications running on the server so I don't want the older applications to stop working if I upgrade to 3.1 . I have IIS installed on the server. Its a Microsoft windows NT version 6.2 DataCenter edition terminal server and my application that I am trying to deploy is .net core 3.1
I just wanted to know whether I should install ASP.NET Core Runtime 3.1.3 or SDK 3.1.201
and installing any of these on the server wont affect the applications that are running on 2.0 .net core framwork.
any help will be apprecaited.
Each .NET Core will define which version it uses and will use that SDK or runtime. Installing another SDK or runtime will not impact previously installed versions.
If your just hosting and not doing any development on the server then you only need to install the runtime. If any development will be taking place you will need the SDK.

dotnet command not working on centos server, runtime installed

I installed aspnet core runtime (aspnetcore-runtime-3.1.3) on a centOS 7 server.
following this guide from microsoft documentation: https://learn.microsoft.com/en-us/dotnet/core/install/runtime?pivots=os-linux#download-and-manually-install
my server doesn't have internet connection.
After installation, when I run any command, e.g.
dotnet --info
it says it can't find any installed dotnet sdk:
$ dotnet --info
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.3
Commit: 4a9f85e9f8
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [/home/myuser/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [/home/myuser/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Previously, I downloaded the rpm package and installed it with rpm -ivh command, same result
What can I do to fix this?
Note that I don't have internet access in the server
EDIT: The problem: I don't need SDK to run this command or any command I am using.
Anyways I've tried installing SDK, it says it can't find any compatible frameworks
What is the problem? you just installed runtime, and the error says there is no sdk.
You installed the .net runtime but didn't install the any sdk. for you to be able use asp.net core you need to install both. you can visit asp.net core documentation for the difference between them. but you can just visit https://dotnet.microsoft.com/download to download the appropriate sdk you need.
nb: I assume you are doing this from a gui. i'm sure there are commands for installing the asp.net core runtime and SDK from command prompt. but what is important is that YOU ARE MISSING THE SDK!!

dotnet core version number and corresponding build

On dev server when i check dotnet core version number it shows
C:\>dotnet --version
Microsoft .NET Core Shared Framework Host
Version : 1.1.0
Build : 928f77c4bc3f49d892459992fb6e1d5542cb5e86
How do i find corresponding build/installation files on dotnet core download page
I am setting up a new server and i need to make sure i have the same version of dotnet core runtime installed as dev.
Also on the same note where can i find prevision vresions on Windows Server Hosting for dotnet core
Screenshot
Just search for the tags or releases inside the .Net Core Github repo or on the archives site on Microsoft.
But you should really upgrade to a version that is not end of life.

"dotnet new" command fails on fresh installation of OS X 10.11.6 OS X El Capitan

I have installed the dotnet-core for OS X using the dotnet-osx-x64.1.0.0.pkg from the official download section. - https://www.microsoft.com/net/download
Running "dotnet new" command gives the below output
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
How to create the basic .net-core project?
I have run the below commands on the user directory without success
echo 'export PATH="$PATH:/usr/local/share/dotnet"' >> ~/.bashrc
and
Created a vi .bash_profile and inserted the below command
export
PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/dotnet
Still the below command fails
dotnet new
This is the version of the .net-core I have
dotnet --version
gives below output
Microsoft .NET Core Shared Framework Host
Version : 1.0.1
Build : cee57bf6c981237d80aa1631cfe83cb9ba329f12
dotnet-osx-x64.1.0.0.pkg is the package containing just .NET Core, basically the runtime.
In order to develop applications, you need the .NET Core SDK. This is also what the error message you see says:
Did you mean to run dotnet SDK commands? Please install dotnet SDK […]
The download website also explains the difference as follows:
You probably only need to download one of these:
.NET Core SDK = Develop apps with .NET Core and the SDK+CLI (Software Development Kit/Command Line Interface) tools
.NET Core = Run apps with the .NET Core runtime
So, just download the .NET Core SDK package for your platform instead. For mac OS, this currently is dotnet-dev-osx-x64.1.0.0-preview2-003121.pkg.
You can also just follow the instructions on the .NET Core quickstart page which gives you detailed step-by-step instructions on how to get .NET Core running properly.