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!
Related
While migration in ef core using below command give me an error.
dotnet tool install --global dotnet-ef
After refer this link , i have executed below command.
dotnet tool install --global dotnet-ef
But still give me an error.
Below packages installed in my project.
Microsoft.EntityFrameworkCore(3.1.25) ,
Microsoft.EntityFrameworkCore.Design(3.1.25),
Microsoft.EntityFrameworkCore.SqlServer(3.1.25),
Microsoft.EntityFrameworkCore.Tools(3.1.25)
For the migrations command you need to install the Microsoft.EntityFrameworkCore.Tools Nuget package.
I have a command that runs after release build.
dotnet nuget push Test.nupkg -s \\Path
I am using Dotnet version
6.0.200
and nuget version
6.1.0.103
In the older version of dotnet (2.1) I used to get a error when pushing duplicate version like this
warning MSB3073: The command "dotnet nuget push "***" exited with code 1.
Is there a way to avoid pushing duplicate in 6.0.200 ?
I tried to install asp.net core 3.1 runtime on linux ubuntue 18.4 lts and used this commands to install asp.net core runtime.
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-3.1
after that every thing installed without any issue but when I want to check asp.net core version on ubuntu os I run this command
dotnet --version
I getting the following massage I have no idea about that I am not installed asp.net core SDK I need to install Runtime to run my web site
dotnet --version
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
dotnet is CLI is driver for CLI interface included with the .NET Core SDK., so you need to install it:
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1
You have only installed runtime which is needed to run apps that were made with ASP.NET Core that didn't include the runtime itself.
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)