When i run dotnet --info in the output i get host version: 3.0.3
What is it?
Recently i have installed and later deleted dotnet sdk 3.0 version, but host version is still 3.0.3 does it affect running my program in 2.2 version of sdk?
Related
I have installed dotnet sdk from https://dotnet.microsoft.com/download/download
after installing I run on terminal: dotnet --version
and I get : zsh: command not found: dotnet
I have operating system: macOS Big Sur 11.6 on MacBook Air (M1, 2020)
I fixed this by downloading and installing Visual Studio 2022 for Mac:
https://visualstudio.microsoft.com/vs/mac/preview/
It will download the dotnet SDK also
Having issues with Ubuntu 20.04. I followed official instruction and installed both SDK & runtime. If can be confirmed from the terminal:
dotnet --list-sdks
3.1.403 [/usr/share/dotnet/sdk]
and runtime:
dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
...yet the project I am trying to dotnet run requires the Microsoft.AspNetCore.App 2.2.8 as can be seen from the log:
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '2.2.8' was not found.
- The following frameworks were found:
3.1.9 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=2.2.8&arch=x64&rid=ubuntu.20.04-x64
What's the correct way to install missing SDKs and runtimes?
So it comes out that Ubuntu 20.04 is not supported for above-mentioned runtime and one have to install them manually.
In my particular case it was enough to download binaries and run them as usual.
I installed the dotnet-ef tool on a Ubuntu server, and it installed successfully. However, the program was still not found:
~/app$ dotnet --version
3.1.201
~/app$ dotnet tool install --global dotnet-ef --version 3.1.3
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '3.1.3') was successfully installed.
After rebooting the server:
~/app$ dotnet-ef migrations add "First On Server"
dotnet-ef: command not found
~/app$ which dotnet
/usr/bin/dotnet
~/app$ which dotnet-ef
~/app$
How do I get the dotnet-ef tool on a Ubuntu machine?
The dotnet tool install command requires elevation!
I'm trying to get my dotnet Core application running on an ubuntu 18.04LTS machine with dotnet core runtime installed.
The command:
dotnet myapp.dll
The result:
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
As far as I understand I do not need the SDK for simply running this application. Just the runtime should suffice, right?
dotnet --info
Host (useful for support):
Version: 2.2.8
Commit: b9aa1abc51
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
How to make this work without installing an SDK?
It actually worked. I was running the dotnet command with the wrong path.. myapp.dll was nested a bit deeper. My mistake.
I'm using Ubuntu 16.04 LTS,
Docker-compose v 1.18.0-rc2, build 189468b
Docker version 17.12.0-ce-rc1, build ee2f943
Running this command: dotnet publish -o /output with docker results in this error:
ERROR: Service 'generator' failed to build: The command '/bin/sh -c
dotnet publish -c Release -o out' returned a non-zero code: 145
I've installed the .NET SDK for Ubuntu and not sure how to resolve this error; it just won't create that publish folder; here's dotnet --info
joel#worker-2:~/workspace/asp (copy)/api$ dotnet --info .NET Command
Line Tools (2.0.2)
Product Information: Version: 2.0.2 Commit SHA-1 hash:
a04b4bf512
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS
Platform: Linux RID: ubuntu.16.04-x64 Base Path:
/usr/share/dotnet/sdk/2.0.2/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build :
e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Link to the same question worded differently with more error logs
The error you are seeing is because your project contains a global.json file that pins the required SDK version to 2.0.2. However, the docker images contain newer SDK versions (current one is 2.1.3) which. Because no 2.0.2 SDK is present in the docker image you use to build, it just errors out.
First, if you are using Ubuntu, docker for Windows is not relevant.
I see dotnet publish -c Release -o out used in "Dockerize a .NET Core application" (and the repo dotnet/dotnet-docker-samples) with images starting with
FROM microsoft/aspnetcore-build:2.0 AS build-env
It is a tag which is multi-arch, meaning it will pull either Windows or Linux containers depending on the host (here Ubuntu)
But you mention in your previous question following the pluralsight.com course docker-images-containers-aspdotnet-core, and that one might only work when done on Windows (meaning Windows server 2016/2017, able to execute Windows images)