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

How to determine output folder of dnu/dotnet publish

When I publish my project with dotnet publish it outputs to a folder bin/Debug/dnxcore50/osx.10.11-x64/publish (or perhaps the Release equivalent) Is it possible to determine this folder location for a postpublish script specified in the…
Brad Robinson
  • 44,114
  • 19
  • 59
  • 88
4
votes
1 answer

testing .net4.8 in VScode using dotnet CLI

I am trying to transform an old non-SDK-style mstest project that was generated with Visual Studio into a new SDK-style project using only Visual Studio Code. I read and followed this little how-to, but this is only for .NET core and newer; not for…
Kjara
  • 2,504
  • 15
  • 42
4
votes
1 answer

How can I suppress .NET CLI's welcome message on first run?

I am using .NET CLI in an Azure DevOps pipeline, and I am using PowerShell to parse its output. The first command I run is dotnet nuget locals global-packages --list. The output when you run this the first time is this: Welcome to .NET…
Michiel van Oosterhout
  • 22,839
  • 15
  • 90
  • 132
4
votes
1 answer

How can I properly generate both TRX files and code coverage results with one call to "dotnet test"?

First, some context: I have a Visual Studio solution containing several production class libraries and nine unit test projects. All the projects are targeting .NET 5. I am running .NET 5.0.401. All unit test projects have references to…
NathanAldenSr
  • 7,841
  • 4
  • 40
  • 51
4
votes
1 answer

How to get C# (analyzer) suggestions visible on the commandline?

What I like about the dotnet CLI is that you can run $ dotnet build --no-incremental, and you always get a list of all the warnings in your project. I use that for making sweeping changes, and such, on projects. Output of that can be piped to unix…
Ties
  • 1,205
  • 2
  • 15
  • 28
4
votes
1 answer

Why $(SolutionDir) is undefined in dotnet CLI?

I'm trying to build my project from dotnet CLI. I'm using dotnet build and it fails. How to reproduct: Create a simple console application using Visual Studio template Add a file named Colors.txt to the solution directory Add a file named…
4
votes
0 answers

dotnet test Runsettings arguments to exclude unit tests from code coverage

So I was able to supply runsettings and that worked dotnet test --filter "TestCategory != Ignore" --no-build --no-restore -v normal --collect "Code coverage" -s *.runsettingss Which included this:
Ofek
  • 325
  • 1
  • 2
  • 13
4
votes
0 answers

encrypt password for http_proxy, access nuget source

Over here Nuget connection attempt failed "Unable to load the service index for source" I saw many solutions proposed for the Unable to load the service index for source ... Error that I find myself getting on an attempted dotnet build right…
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
4
votes
2 answers

Depend on local C# project

I have two C# projects in the same directory. . ├── MyLib │   ├── MyLib.cs │   ├── MyLib.csproj │   └── bin │      └── Debug │      └── netstandard2.0 │      ├── MyLib.deps.json │      ├── MyLib.dll │      └──…
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
4
votes
3 answers

NuGet pack "The DateTimeOffset specified cannot be converted into a Zip file timestamp"

When I want to pack my library as a NuGet package, I get the below error The DateTimeOffset specified cannot be converted into a Zip file timestamp I'm using the below command to pack my project: dotnet msbuild /t:pack /p:Configuration=Release…
Alper Ebicoglu
  • 8,884
  • 1
  • 49
  • 55
4
votes
1 answer

dotnet ef Could not execute because the specified command or file was not found

In angular + asp.net core 3.1 project, I am getting this error, whenever I try to access anything related to EF. dotnet ef Could not execute because the specified command or file was not found. Possible reasons for this include: * You misspelled…
user2681220
4
votes
0 answers

launchBrowser doesn't work when invoking launch profile of asp.net core project

When I run "dotnet watch run --launch-profile Watch" the project starts, but no browser launched. launchSettings.json, profile Watch: "Watch": { "commandName": "Project", "executablePath": "C:\\Program Files\\dotnet\\dotnet.exe", …
SteinTheRuler
  • 3,549
  • 4
  • 35
  • 71
4
votes
1 answer

dotnet cli how to create project using previous sdk/framework?

Let's say that I'm using Core 3.0 with Blazor templates installed My VS updated and downloaded sdk 3.1 preview X and now my dotnet cli works in 3.1 preview by default so using dotnet new doesn't show my installed Blazor templates that I installed…
Axelly
  • 589
  • 3
  • 7
  • 26
4
votes
3 answers

How do I publish NuGet packages to GitHub Package Registry using dotnet on Mac?

The documentation is not complete and currently I cannot consume or publish package to GPR using dotnet on Mac. Any help would be useful
4
votes
2 answers

How to get camel case version of project name with .NET CLI custom templates

I am trying to create a template project for the dotnet CLI and I have a need to alter the format of the project name for some replacements. Specifically, convention within our domain uses a camel-case version of the project name as an identifier…
Steve In CO
  • 5,746
  • 2
  • 21
  • 32