Questions tagged [dotnet-cli]

For use of questions about the .NET Core command line tool-chain. This does not relate to dnx, dvnm, dnu or any of the previous tools build with .NET Core.

The .NET Core command-line interface (CLI) is a cross-platform toolchain for developing .NET applications.

Resources

Related tags

474 questions
12
votes
6 answers

Getting "System.Data.SqlClient is not supported on this platform" when launched as dotnet cli tool

We have a simple netcore 2.2 console application using DbContext from Microsoft.EntityFrameworkCore. When launched from console as is it works as expected. However we decided to utilize it as a dotnet CLI tool. It's .csproj file contains:
horgh
  • 17,918
  • 22
  • 68
  • 123
12
votes
1 answer

Unable to install packages using dotnet add package

I'm a .NET newbie using VS Code while following an online course on Angular and .NET Core. The course requires the AutoMapper.Extensions.Microsoft.DependencyInjection package to be installed but I keep getting the following errors when I try install…
juanitooo
  • 491
  • 1
  • 4
  • 9
12
votes
4 answers

How to add all projects to a single solution with dotnet sln?

Following examples from here I'm trying to execute dotnet sln AllProjects.sln add **/*.csproj But I get this error: Could not find project or directory **/*.csproj. Looks like wildcards are not working. What am I doing wrong?
astef
  • 8,575
  • 4
  • 56
  • 95
12
votes
1 answer

How to "dotnet pack" an already compiled project

I'm trying to design a build script for a dotnet core 2.0 project that does the following actions Cleans output directories Builds Solution with -o bin\Publish Runs Unit Tests with dotnet vstest Creates a Nuget package with dotnet pack Because I…
Joe van de Bilt
  • 225
  • 1
  • 3
  • 12
12
votes
3 answers

Creating ASP.NET Core SQL Cache table

I'm trying to generate the Distributed SQL Server Cache for ASP.NET Core 2.0, using the CLI, but I only get an error. The instructions say to execute dotnet sql-cache create but when I do, it simply…
David
  • 2,782
  • 4
  • 31
  • 47
12
votes
3 answers

Is .NET CLI only for .NET Core?

Do I use the .NET CLI if I want to create an ASP.NET Core 1.0 app that uses the .NET Framework? Is .NET CLI only for the new .NET Core library or both Core and .NET 4.6?
Sam
  • 26,817
  • 58
  • 206
  • 383
12
votes
2 answers

Unable to build default ASP.Net Core Web Application (.NET Core) on Visual Studio Team Services using Hosted Agent

Having created a new ASP.Net Core Web Application (.Net Core) project in Visual Studio 2015 Update 3 and checked this in to a Visual Studio Team Services git repository. I am using the release version of .Net Core and ASP.Net Core. I am now trying…
TomRay74
  • 513
  • 6
  • 17
12
votes
3 answers

dotnet core user-secrets executable mysteriously missing, why?

Installed the most recent (I think) .NET Core, created a .NET Core web project via Visual Studio 2015, and tried to start using user secrets. The CLI claims it is missing (after claiming to have installed it...), as…
Fizzbuzz97
  • 719
  • 1
  • 6
  • 14
11
votes
1 answer

Dotnet CLI Hot Reload: always restart app on rude edits?

When using Hot Reload in the .NET CLI... $ dotnet watch watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. Press "Ctrl + R" to restart. watch : Building... ... watch : Started ... any rude edit leads…
Max
  • 9,220
  • 10
  • 51
  • 83
11
votes
1 answer

`dotnet sln add` wrong project type GUID

When I do dotnet sln add {myProject.csproj} for a .NET Core/Standard project, it adds it as project type (I think) {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} instead of .NET Core's {9A19103F-16F7-4668-BE54-9A1E7A4F7556}. Hence, when I open the solution…
Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
11
votes
2 answers

DotNet Pack Not Doing Anything

I am trying to create a nuget package for my web application but it is not producing any .nupkg outputs. I am using Visual Studio 2017 15.3.0. To create the project I do the following: File - New - Project, Visual C# - Web, Asp.Net Core Web…
Frank Cannon
  • 1,643
  • 2
  • 18
  • 29
11
votes
1 answer

Choose the SDK version (e.g. preview3 vs preview2) that the dotnet CLI uses

We have three versions of the dotnet command line interface installed: C:\Program Files\dotnet\sdk> dir -name 1.0.0-preview2-003133 1.0.0-preview2-1-003177 1.0.0-preview3-004056 How can we choose which version to use…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
10
votes
3 answers

Dotnet watch run - Force reload on "rude edit" - .Net 6

I run web projects like this, during development: dotnet watch run The project/browser reloads when I make a change. Awesome! However, sometimes I will be shown this: Unable to apply hot reload because of a rude edit. Do you want to restart your…
Kjensen
  • 12,447
  • 36
  • 109
  • 171
10
votes
1 answer

Passing define constants to dotnet build kills target framework symbols

I created a small application which targets two frameworks (.net core 2.2 and .net core 3.0) and uses target framework symbols (NETCOREAPP2_2 and NETCOREAPP3_0). The project file is very simple and looks so:
ie.
  • 5,982
  • 1
  • 29
  • 44
10
votes
2 answers

dotnet pack "The element is unrecognized"

Im trying to create a NuGet package of a dotnet new template. I created a nuspec file to set the details of the package, and it sits adjacent to my contents foler, which contains everything I want packaged up:
Ethan Schofer
  • 1,718
  • 5
  • 26
  • 55
1 2
3
31 32