-
-
Save normanlmfung/2046b4af62591d1b463267a30083c6eb to your computer and use it in GitHub Desktop.
dotnet commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List the kind of applications you can create: | |
dotnet new list | |
To create a new 'console' app (.NET Core Console): | |
dotnet new console --framework net6.0 -n CSharpDotnetCoreConsole | |
To create a new 'webapi' project (Not 'webapp', please note): | |
dotnet new webapi --framework net6.0 -n Commander | |
To install packages from command prompt: | |
nuget.org | |
Microsoft.EntityFrameworkCore --- https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/8.0.0-rc.1.23419.6 | |
Microsoft.EntityFrameworkCore.Design | |
Microsoft.EntityFrameworkCore.SqlServer | |
Example from command prompt: dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 8.0.0-rc.1.23419.6 | |
Installed packages be under here (Not GAC like in olden days): | |
C:\Users\norman\.nuget\packages | |
ccxt | |
https://www.nuget.org/packages/ccxt/0.0.35-beta | |
To install Dotnet EntityFramework: | |
dotnet tool install --global dotnet-ef | |
To check if you've installed it? | |
dotnet ef | |
EF migration | |
dotnet ef migrations add InitialMigration | |
dotnet ef migrations remove | |
dotnet ef database update | |
To build your project: | |
dotnet build | |
To run your project: | |
dotnet run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment