- -Go to menu “Manage”
- -Select “Settings”
- -Select “User” tab
- -Search for “files.trimTrailingWhitespace”
- -Enabled
Tested on: VS Code 1.75.1
Tested on: VS Code 1.75.1
Having a project with everything necessary to generate a Code-First database
-Open a Terminal
A) To check if the EF CLI tools are installed, type
dotnet ef
-This will show what versions of the CLI tools are installed.
B) To install the CLI tools, type
dotnet tool install –global dotnet-ef
-This will install the CLI tools, in case you need to update use “update” instead “install”
C) To see the list of available migrations, type
dotnet ef migrations list
-This will show all existing migrations
D) To add a migration, type
dotnet ef migrations add MigrationName
-This will add a new migration with the name MigrationName
E) To create/update a database with available migrations, type
dotnet ef database update
-This creates or updates the current database
F) To remove a specific migration, type
dotnet ef migrations remove MigrationName
-This will remove the migration with the name MigrationName
G) To remove a database, type
dotnet ef database drop
-This will completely delete the database
Tested on: VS Code 1.68/.NET 6.0/EntityFrameworkCore 6.06
-On VSCode
-Having a project called ProjectName
-Open a Terminal (“View”, “Terminal”), type
dotnet add package PackageName.Json
-This will add the package PackageName to the console project ProjectName
Tested on: VS Code 1.62/.NET 5.0
-Start VSCode
-Go to “File”, “Open Folder” and create a folder where and with the name you want it “FolderName“
-Open a Terminal (“View”, “Terminal”), type
dotnet new webapi -o WebApiName -f net5.0
-This will create a webapi project on the folder your create with the name “WebApiName“
Tested on: VS Code 1.62/.NET 5.0
-Start VSCode
-Having a project called ProjectName, open file ProjectName.csproj and add:
<ItemGroup>
<None Update=“FullFilePath”>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
Tested on: VS Code 1.61
-Start VSCode
-Having a project called ProjectName, open file ProjectName.csproj and add:
Tested on: VS Code 1.60
-Start VSCode
-Having a project called ProjectName, open file ProjectName.csproj and add:
Tested on: VS Code 1.60
-Start VSCode
-Having a project called ProjectName, open file ProjectName.csproj and add:
Tested on: VS Code 1.60
-Start VSCode
-Having a project called ProjectName, open file ProjectName.csproj and add:
Tested on: VS Code 1.60
-On VSCode
-Having a solution called SolutionName and a project called ProjectName
-Open a Terminal (“View”, “Terminal”), type
dotnet new nunit -o UnitTestProjectName -f net5.0
-This will create UnitTest project UnitTestProjectName, type
dotnet sln add UnitTestProjectName/UnitTestProjectName.csproj
-This will add the UnitTest project to the solution, type
dotnet test UnitTestProjectName/UnitTestProjectName.csproj
-This will run the UnitTest
Tested on: VS Code 1.60