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
10
votes
1 answer

dotnet core build in parallel or simultaneously

In this solution I have 2 apps: AppA, AppB that share class library Shared. I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and…
Wilhelmina Lohan
  • 2,803
  • 2
  • 29
  • 58
10
votes
3 answers

Excluding File From Publish Directory in VS 2017 .NET Core Project

I have a .gitignore file in the wwwroot folder of my project that I am trying to exclude from being published. The following code does not seem to work:
Muhammad Rehan Saeed
  • 35,627
  • 39
  • 202
  • 311
10
votes
1 answer

How to open dotnet-core CLI project in Visual Studio 2017

I have been developing a simple application using dotnet Core (for an API) and Angular2 for the purpose of learning both. I created the project using Yeoman on the command line and have been happily coding away in Visual Studio Code (on Windows).…
harunahi
  • 724
  • 1
  • 6
  • 14
10
votes
2 answers

Trouble restoring Mvc CodeAnalysis dependencies using dotnet cli

I'm having an error restoring dependencies for an ASP.NET 5/ASP.NET Core 1.0. It appears that a couple of the dependencies (namely Microsoft.CodeAnalysis.CSharp / .Common) of Microsoft.AspNet.Mvc are fixed to seemingly out of date packages. A…
dav_i
  • 27,509
  • 17
  • 104
  • 136
9
votes
2 answers

c# dotnet CLI "error: There are no versions available for the package 'Newtonsoft.Json'."

I am new to c# , I am trying to add package to my project I tried before to add "Microsoft.Toolkit.Uwp.Notifications" by dotnet cli dotnet add package Microsoft.Toolkit.Uwp.Notifications , and then tried to mimic Microsoft example Microsoft.Docs …
mohammad ismael
  • 167
  • 5
  • 13
9
votes
2 answers

Suppress warnings using .NET Core CLI task (DotNetCoreCLI@2) in Azure DevOps pipeline

Trying to suppress warnings in Azure DevOps pipeline using .NET Core CLI task (DotNetCoreCLI@2), but getting the following error: MSBUILD : error MSB1001: Unknown switch. Switch: --noWarn:MSB3277 Here is an example of the code, which is similar to…
Terry
  • 117
  • 1
  • 5
9
votes
3 answers

Unable to push nuGet packages to GitLab with dotnet CLI due to Unauthorized error

GitLab now supports nuget public and private feed repository. I've got a public project (e.g: https://gitlab.com/sunnyatticsoftware/sasw-test-support) I create an access token for my user with api and write_repository (e.g: AAABBBCCCDDD) I create a…
diegosasw
  • 13,734
  • 16
  • 95
  • 159
9
votes
1 answer

Can not create classlib (core) using dotnet CLI

I used the dotnet CLI command dotnet new classlib -o ProjectName to create a class library and added the EF Core Package using dotnet add package but when I tried to run some dotnet ef commands it threw the following error. Error Message Later, I…
9
votes
1 answer

How do you store user app data in .net core console app

My scenario is I'm building a small cli app that I want to be able store user specific data in some kind of user local cache. I guess I'm looking for something similar to the Environment.SpecialFolder.ApplicationData path, but in dotnet core and…
Matt Whetton
  • 6,616
  • 5
  • 36
  • 57
9
votes
1 answer

Asp core wrong assembly redirect on publish

When publishing my asp core project using visual studio a .config file is created alongside my executable. The .config includes a couple of bindingRedirect like this:
peco
  • 3,890
  • 1
  • 20
  • 27
9
votes
1 answer

DOTNET1011: Framework not installed: .NETFramework

I'm adding this here because it caused me a headache this morning while fixing our build server: Executing dotnet build would show me the following errors: DOTNET1011: Framework not installed: .NETFramework,Version=v4.6.1 error NU1001: The…
ciriarte
  • 1,433
  • 2
  • 13
  • 23
8
votes
3 answers

Why does "dotnet ef migrations add" throw a Win32Exception?

I have a dotnet core v3.1 project with an entity framework DbContext. when I try to run: dotnet ef migrations add someMigrationName this Exception will be thrown: System.ComponentModel.Win32Exception (2): No such file or directory at…
Navid_pdp11
  • 3,487
  • 3
  • 37
  • 65
8
votes
1 answer

Add dependencies of reference projects to NuGet package

I'm using dotnet pack command for creating a NuGet package for the following scenario: The projects structure: Project B |----> Project A Project A |----> SomePackage I want to create a single NuGet package the contains ProjectB.dll, ProjectA.dll,…
itaiy
  • 1,152
  • 1
  • 13
  • 22
8
votes
2 answers

How can I tell compiler to copy wwwroot from one project to Tests proj?

Let's say I have this structure of projects: - AppRunner | - Apprunner.csproj | - wwwroot - Tests | - Tests.csproj | - bin | - debug | - netcoreapp2.1 …
Joelty
  • 1,751
  • 5
  • 22
  • 64
8
votes
1 answer

dotnet run --project issue with https

I'm trying to replicate what Visual Studio does on F5 debugging in my .net core api application. It seems that "dotnet run --project" is the trick that I'm looking for except for one thing: When I run with F5, it runs on https and it is…
JBoothUA
  • 3,040
  • 3
  • 17
  • 46