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

Dotnet commands fail when restoring Nuget packages in shell script

Context I am currently extending my companies shell script to build a .net solution on a build server. This solution consists out of multiple projects which some need to be build and published and some don't. These projects also vary in framework as…
0
votes
1 answer

How to run `dotnet list package --deprecated` for Azure Artifact feed on Azure Pipelines

I'm trying to run dotnet list package --deprecated for projects which used packages from Azure Artifact feed. I wrapped it in DotNetCoreCLI task: - task: DotNetCoreCLI@2 displayName: 'List deprecated packages' continueOnError: true …
Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107
0
votes
1 answer

Dotnet new project cannot run

I (almost) try to get an helloworld with dotnet cli on Linux. In fact I simply try to create a MVC project. I installed (and reinstall multiple times during this process) dotnet-sdk-bin from AUR. dotnet new mvc -n foo cd foo/ dotnet run Result…
Ashijo
  • 90
  • 8
0
votes
1 answer

How do I create a .NET Core 2 MVC solution?

Using MS Visual Studio 2019. Need to create a .NET Core 2 MVC Solution. I need to target .NET Core 2 and not 3 because I need to use some libraries that, unfortunately, doesn't target .NET Core 3. Is there any way to use Visual Studio 2019 for this,…
HelloWorld
  • 3,381
  • 5
  • 32
  • 58
0
votes
0 answers

What happens when dotnet build is called with a build configuration that doesn't exist?

I did some quick searching and was not able to find an answer to what happens when you do something like dotnet build --configuration foobar and the configuration foobar is not defined. I also tested this out but wasn't able to tell what exactly was…
David Carek
  • 1,103
  • 1
  • 12
  • 26
0
votes
1 answer

In Azure DevOps pipelines for .Net Core applications, how can I authenticate against an Azure Artifacts feed without using the .NetCoreCLI task?

I have an Azure DevOps pipeline for one of my .Net Core projects. I would like to encapsulate as much of the build process as possible so I can run builds on my local machine, so I have the steps of restore, compile, test, publish, etc.…
Derek Greer
  • 15,454
  • 5
  • 45
  • 52
0
votes
1 answer

How to run dotnet new command and create a new project directly in code

So I want to create new dotnet projects directly from my c# code, presumably by running a dotnet new command or something of the like, but I can’t find the syntax for it. Pretty much everything I’ve googled comes up with how to create a project via…
Paul DeVito
  • 1,542
  • 3
  • 15
  • 38
0
votes
0 answers

How to override nuget dependencies id in nuspec file

I have projectA and projectB in the same solution. projectA creates its own package, but I override the package id by using a prefix: $(PackageIdPrefix)$(MSBuildProjectName) The command…
Sam
  • 13,934
  • 26
  • 108
  • 194
0
votes
2 answers

Azure Pipeline Pack Nuget Packages with custom name

In my solution I have a few projects, which pack their own nuget packages on build. When packing the package I use the PackageID parameter to add a customprefix to the package name (which otherwise would be the name of the project). dotnet pack …
Sam
  • 13,934
  • 26
  • 108
  • 194
0
votes
0 answers

Generate dotcover coverage report with jenkins

I have ci server setup on jenkins which builds the .net core 2.2 application. and then generates Test Coverage report using dotcover. I am executing following command from jenkins job to generate coverage report using dotcover in the directory where…
Tech Yogesh
  • 427
  • 4
  • 18
0
votes
1 answer

Dotnet Core - Get the application's launch path

Question - Is there a better/right way to get the application's launch path? Setup - I have a console application that runs in a Linux Debian docker image. I am building the application using the --runtime linux-x64 command line switch and have all…
Craig Selbert
  • 737
  • 1
  • 8
  • 17
0
votes
2 answers

dotnet is not recognized as the name of a cmdlet (MacOS)

This is a really weird thing that happens to me now and then. When using visual studio on mac and I use the Nuget Package manager console, sometimes it looses access to dotnet. Then I start pocking around and somehow it fixes again (it can take a…
0
votes
1 answer

dotnet cli creating folders within projects doesn't get added to solution

I've used dotnet cli to create a solution and subsequent projects inside. As part of the exercise i am also trying to create folders within the projects to store different type of classes. I use mkdir to create the folder, which works however when i…
Aeseir
  • 7,754
  • 10
  • 58
  • 107
0
votes
0 answers

PowetShell OutputType not defined in some cmdlets

Some of the cmdlets that I'm using does not have an OutputType defined. However, when the cmdlet is executed (with parameters) the result has the OutputType. Example 1: When I execute: Get-Command -Name Get-ADUser | FL * No OutputType is…
0
votes
1 answer

How to publish dotnet core web back-end by FTP?

I want to publish dotnet core program without using Visual Studio. I used dotnet build /p:DeployOnBuild=true /p:PublishProfile=FTP(The profile FTP works without any issues in Visual Studio). But there is no file in the FTP website after this command…
minskiter
  • 73
  • 1
  • 7