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
8
votes
3 answers

Push Nuget Package to Azure DevOps

I am trying to push a Nuget package to Azure DevOps from a MAC. I created an Azure DevOps artefacts feed and tried to push a package using: dotnet nuget push --source "https://pkgs.dev.azure.com/MyProject/_packaging/MyFeed/nuget/v2" --api-key…
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
8
votes
2 answers

Run angular production release after dotnet publish

I have an ASP.NET Core 2.0 application with and Angular 5 SPA hosted in the same folder. Currently to deploy to IIS, I do the following: // First publish the release configuration dotnet publish -c release // Now delete the wwwroot directory as it…
Evonet
  • 3,600
  • 4
  • 37
  • 83
8
votes
2 answers

How do I change connection string for Update-Database ef migrations?

I am trying to run Update-Database, and I would like to specify the connection string, but the CLI is looking at the wrong one. There are two connection strings in my appsettings.json file: { "Logging": { "IncludeScopes": false, …
8
votes
1 answer

Cannot create Nuget package that has xunit as dependency

Steps Create a new .NETStandard 2.0 project e.g ClassLibrary1 Add xunit package as dependency Open the command prompt and go to the location Execute following two commands to create package Please check dotnet pack for more details dotnet build…
MJK
  • 3,434
  • 3
  • 32
  • 55
8
votes
1 answer

Push a NuGet package to VSTS with .NET CLI

I'm trying to publish a NuGet package to a private VSTS feed. I'd like to achieve that using only .NET CLI and without creating or modifying a nuget.config file. I've tried to do: dotnet nuget push --source…
Jakub Binkowski
  • 553
  • 1
  • 5
  • 10
8
votes
0 answers

Access to the path 'InterfaceStubGenerator.BuildTasks.dll' is denied after clearing nuget cache

I've just cleared all my nuget caches using: dotnet nuget locals all --clear But now when i try to restore/build I get the following error C:\dev\noddy\src\noddy.Api>dotnet build C:\Program Files\dotnet\sdk\2.0.0\NuGet.targets(102,5): error :…
Kevin Smith
  • 13,746
  • 4
  • 52
  • 77
8
votes
1 answer

Updating Microsoft.NETCore.App to v1.1.0 causes -2147450749 (0x80008083)

I created a new .NET Core project in Visual Studio 2015 by following the instructions at: https://www.microsoft.com/net/core#windowsvs2015 It works OK, and I can add breakpoints etc. no problem. Then I ran Tools->NuGet Package Manager->Manage NuGet…
Greg Barlow
  • 198
  • 11
8
votes
1 answer

ASP.NET Core RC2 Can't Find Html Encoder Implementation

Can anyone show me an example of how to HTML encode text with the HtmlEncoder class in the System.Text.Encodings.Web namespace? I'm converting an ASP.NET Core RC1 project to RC2. In the RC1 project I'm using the HtmlEncoder class in the…
Clint B
  • 4,610
  • 2
  • 18
  • 22
7
votes
2 answers

I installed a tool for dotnet CLI, why command tool list did not show it?

Look at the screenshot so you can better understand my question. Why dotnetsay tool was not listed?
Samuel Le
  • 83
  • 5
7
votes
1 answer

Failure to Install Microsoft.AspNetCore.AppRef

When I tried installing Microsoft.AspNetCore.AppRef in my webapplication in .net core 3.1. However, I get this error instead: Package 'Microsoft.AspNetCore.App.Ref 3.1.3' has a package type 'DotnetPlatform' that is not supported by project 'xxxxxx'.…
HelloWorld1
  • 13,688
  • 28
  • 82
  • 145
7
votes
2 answers

dotnet semantic versioning in a continuous deployment environment

I am configuring semantic versioning with GitLab for my dotnet core apps and netstandard 2.0 packages. After reading quite a bit of opinions, some of them contradictory, this is what is clear to me. A semantic version should be something…
diegosasw
  • 13,734
  • 16
  • 95
  • 159
7
votes
2 answers

Unable to locate repository containing directory during dotnet build or publish

I am adding support for Docker on my ASP.NET Core 2.2 app and while testing the commands for docker locally I've found that the dotnet publish -f netcoreapp2.2 -c Release -o out errors…
Paul
  • 42
  • 5
  • 19
7
votes
3 answers

dotnet new --install is looking at wrong NuGet server

Running: dotnet new --install Microsoft.AspNetCore.SpaTemplates::* Generates the below error: C:\Program Files (x86)\dotnet\sdk\1.0.4\Nuget.targets(97,5): error : Unable to laod the service index for source…
Animal Style
  • 689
  • 2
  • 10
  • 31
7
votes
2 answers

WebHostBuilder.Build() MissingMethodException in .NET Core migrated solution

I'm migrating a solution built with .NET Core SDK 1.0.0-preview2-1-003177 because I want to use it in Visual Studio 2017. I use the dotnet migrate command from .NET Core SDK 1.0.1, it goes well, it compiles. When I run the web part with IIS Express…
oskarnrk
  • 113
  • 1
  • 6
7
votes
1 answer

Writing custom Code generator for Dotnet Core

I am trying to write a custom code generator for dotnet core, but had little success so far with the limited documentation around it. Poked around the CodeGeneration source code a bit, found out how to trigger the generators from command line and…
jjk_charles
  • 1,250
  • 11
  • 23