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
29
votes
6 answers

Compile multiple dotnet core projects in one step using dotnet cli

Assuming this folder structure SampleApp global.json Src Web project.json Startup.cs ... Model project.json …
wal
  • 17,409
  • 8
  • 74
  • 109
27
votes
3 answers

what is major difference between dotnet publish and dotnet pack

What is the major difference between dotnet pack and publish? From Microsoft's description, my understanding is that pack creates a package while publish creates package + DLL. Is this correct? If so, why not just always use publish and not use the…
Lost
  • 12,007
  • 32
  • 121
  • 193
22
votes
4 answers

How to filter NUnit tests by category using "dotnet test"

I have a project that has a [TestFixture, Category("Oracle")] and a [TestFixture, Category("OracleOdbc")] with a couple of tests which I would like to execute separately using dotnet test. Here's what I tried after some Googling: dotnet test…
Dejan
  • 9,150
  • 8
  • 69
  • 117
20
votes
2 answers

dotnet publish command is not creating zip file package for asp.net core web application project

I am trying to create a web deployment package for asp.net core web application. When I tried to publish the output as a package using VS2017, I got all the necessary files in "Publish" folder as well a zip file containing all those files in given…
Kannan D
  • 467
  • 1
  • 4
  • 15
20
votes
2 answers

Is there a .NET Core CLI pre before build task?

The question I assume when msbuild is about to compile source code files, it produces a list of files to build, based on Include and Exclude rules of the project. Is there a way to execute a task before the list of files to compile is evaluated…
Sebastien ROBERT
  • 596
  • 1
  • 5
  • 10
20
votes
1 answer

Why does Google.Pubsub.V1 beta01 not work with dotnet cli projects?

I have created a very simple program which should list the topics available in a Google Cloud project. The code is trivial: using System; using Google.Pubsub.V1; public class Test { static void Main() { var projectId = "(fill in…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
19
votes
6 answers

Enum Description attribute in dotnet core

Do we have Description attribute for Enums in dot net CLI? (Dot Net Core RC2) If not, any alternative?
TSR
  • 714
  • 2
  • 7
  • 24
18
votes
2 answers

How to list available package versions using the dotnet cli?

Using the dotnet cli how can you list the available package versions for a specific package?
Simon
  • 33,714
  • 21
  • 133
  • 202
18
votes
1 answer

How do I build a native binary on .NET Core using the current preview?

Using the current .NET Core preview, how do I compile (Publish ?) a native binary for a console application. I am on Mac OS 10.11. I did the following: dotnet new dotnet restore dotnet publish I kind of expected "publish" to build a native binary…
driis
  • 161,458
  • 45
  • 265
  • 341
16
votes
3 answers

dotnet pack - How do you specify the name of the package?

I am trying to pack a library as a NuGet package in powershell, like so: function Create-NuGetPackages($projects) { if (!(Test-Path $NuGetPackageDirectory)) { New-Item $NuGetPackageDirectory -ItemType Directory } foreach…
NightOwl888
  • 55,572
  • 24
  • 139
  • 212
15
votes
1 answer

Convert a project.json to a csproj without using Visual Studio

As of preview3 dotnet new produces a csproj, and both dotnet restore and dotnet build fail against a project.json and/or an xproj. For instance, running dotnet restore against a directory that has both a project.json and an xproj gives this…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
15
votes
1 answer

C# - F# Interop support in Visual Studio 2015 on .NET Core

Note: here I talk about dotnet core and not full framework! For full framework there are plenty of docs on this, but this is dotnet core. I have an F# library created by dotnet new --lang F# And an ASP.NET Core RC2 C# application (created by…
gregkalapos
  • 3,529
  • 2
  • 19
  • 35
14
votes
6 answers

.NET Core 1.0 - How to run "All tests in Solution" with xUnit command line

The Getting started with xUnit.net (.NET Core / ASP.NET Core) page describes how to run tests with dotnet test command line. It states that it requires a specific project.json, where we add xunit dependencies and test runner: "testRunner":…
Bruno Garcia
  • 6,029
  • 3
  • 25
  • 38
12
votes
1 answer

Add optional content in dotnet new templates in non c# files

I want to modify the content of README.md based on what the developer selects when creating a c# solution from the template. How do I do it? I know that you can define "symbols": { "EnableContent":{ "type": "parameter", …
Ossi Galkin
  • 491
  • 2
  • 11
12
votes
1 answer

How to Install dotnet dev-certs certificate on a CI Server

I would like to run my API using dotnet run, so I can run some tests against it. However, on Azure Pipelines and AppVeyor, they don't have a developer certificate installed and I get an error when I try to start my API. Installing a developer…
1
2
3
31 32