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
0 answers

Running ASP NET Core from CommandLine

I have this AspNetCore application that runs ok under VS2019. Listens correctly on 5001 and all. But when I try to run it from bin\Debug\necoreapp3.1 folder from command line using dotnet mywebapp.dll it goes up normally (stating that it is…
0
votes
2 answers

how to choose a particular dotnet core sdk when publishing dotnet app

I have an application targeting dotnet 5.0.* which I publish using the command line. I've used Visual Studio 2019 with dotnet 5.0.* SDK installed and publishing worked fine on that. But, I recently installed Visual Studio 2022 Preview, and tried…
Sandip124
  • 3
  • 5
0
votes
1 answer

dotnet.exe CLI - Check if a newer nuget version is available

I developed a (non-public) nuget-tool. The installation was very easy: dotnet tool install dotnet-mytoolname -g My colleagues will also install these tool by the command. In future I will release new versions of dotnet-mytoolname. Consumers will…
Alois
  • 361
  • 2
  • 18
0
votes
1 answer

How to pass Version/PackageVersion parameter to DotNet Core CLi

I'm using Github Package Registry for my own nuget packages. Here is my dotnet nuget push command. dotnet nuget push "bin/Release/${ProjectName}.${PackageVersion}.nupkg" --source --api-key ${ProjectName} -> Works…
Kenan Nur
  • 383
  • 6
  • 17
0
votes
1 answer

MSBuild props file does not get evaluated when imported by a nuget package, but works when manually imported

I have created a number of nuget packages with msbuild targets that help me take care of common boilerplate in my .NET projects. Here I am working on a simple .props file which is aimed to make the copyright information in the compiled assembly and…
Ivaylo Slavov
  • 8,839
  • 12
  • 65
  • 108
0
votes
2 answers

Create new ASP.NET Core project that targets .NET Framework by DotNet CLI

I try to create a new ASP.NET Core project that target the classic .NET Framework. The template web and webapi have the option framework, but this don't accept .NET Framework value like : dotnet new web --name MyWebProject --framework net48 Error:…
vernou
  • 6,818
  • 5
  • 30
  • 58
0
votes
0 answers

Is it possible to build a project with a com reference with the dotnet CLI?

When I started my new project (.net 5.0), I used to script the build using the dotnet CLI: dotnet build Everything worked well until I recently had to add a COM reference to the project: (I am not very used to the way this COM stuff works, so…
fharreau
  • 2,105
  • 1
  • 23
  • 46
0
votes
0 answers

use ssh key for accessing nuget source

Over here I saw many solutions proposed for the I am getting an error on dotnet build: Unable to load the service index for source ... I saw solutions here: Nuget connection attempt failed "Unable to load the service index for source" but none…
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
0
votes
1 answer

How to do a dotnet install in a deployment group?

I'm trying to install and use a mage tool in a VM via Azure Deployment Groups. I've already installed .NET 5 SDK and validated that it is installed in the target VM via Command Prompt. In Azure DevOps. I've tried running dotnet tool install --global…
Hexxed
  • 683
  • 1
  • 10
  • 28
0
votes
1 answer

dotnet publish generates many DLLs not used by my application

I'm trying to optimise the size of my application package. Targeting .NET5.0 When I run the following commands: dotnet new console -o MyConsole cd MyConsole dotnet publish -r win-x64 -c release --self-contained I get a distributable version of my…
Serge P
  • 1,591
  • 8
  • 22
  • 42
0
votes
1 answer

How do I use the AWS CLI to do a lambda serverless deployment for a dotnet 5 project

Good morning. I'm trying to use the CLI to do an automated deployments to AWS lambda of my C# lambda project. With dotnet 3.1 I would do the following. dotnet lambda deploy-serverless --configuration debug --stack-name custom-webhook-dev --s3-bucket…
0
votes
2 answers

Anyway to enable solution level SSL using dotnet CLI?

I am using dotnet CLI to run projects through a Powershell script. There is an SSL notification that pops up when we load the solution for the first time, which gives Yes/No options. I want to accept that or set the SSL to true using dotnet…
Shujath
  • 846
  • 1
  • 8
  • 22
0
votes
1 answer

dotnet bundle on GitHub Action

I am trying to run dotnet bundle on my .Net Core 2.1 GitHub Action. The action with the error shown below: Run cd ./ProjName cd ./ProjName dotnet bundle shell: /bin/bash -e {0} env: DOTNET_ROOT: /home/runner/.dotnet No executable found…
0
votes
0 answers

New Angular App: ng new or dotnet new angular?

I'm about to start a new Angular application. It will serve as the frontend to an ASP.NET Core Web API. Because all of the code I have so far is managed within a single dotnet solution, I thought it would be convenient to be able to add the…
jsdev17
  • 1,050
  • 2
  • 15
  • 25
0
votes
0 answers

dotnet cli can't detect installed package?

I was following https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-3.1&tabs=netcore-cli with dotnet cli on alpine-linux. After executing dotnet aspnet-codegenerator identity -dc…
beardeadclown
  • 327
  • 2
  • 14