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

dotnet restore not using PackageReference condition

my project has multiple target frameworks, 2 of the package reference need to use a different version for .net461 when building in VS 2017 everything works and the dependency shows using the right versions. but when build using dotnet cli, the…
4
votes
1 answer

dotnet publish sln having projects with multiple target frameworks fails

I have a solution with many projects. Some target frameworknetcoreapp2.1, some other target framework netstandard2.0 and one project has a double target framework netstandard2.0;net471 I'd want to have a…
Lorenzo Isidori
  • 1,809
  • 2
  • 20
  • 31
4
votes
1 answer

dotnet build not showing StyleCop warnings that Visual Stuio does

I've created a small project and added the StyleCop.Analyzers package (based on Roslyn). When I build in Visual Studio, I can see some warnings, which is what I expect. However, when I build it using the dotnet CLI (dotnet build), I get no warnings.…
Peter
  • 13,733
  • 11
  • 75
  • 122
4
votes
1 answer

Creating and referencing class libraries with dotnet CLI and VSCode just like you can do in Visual Studio

I want to start using vscode to develop .net core apps, but I am a bit confused about how to create class libraries as separate projects and reference them. For example: In a Visual Studio Solution I would add a Web API project and then several…
Blake Rivell
  • 13,105
  • 31
  • 115
  • 231
4
votes
1 answer

How to get .NET Core 2.0 xUnit test reports into VSTS

How do I get .NET Core 2.0 xUnit test reports produced and published into VSTS?
Luke Puplett
  • 42,091
  • 47
  • 181
  • 266
4
votes
2 answers

Build Error with pre-compiled Azure Function Library

Recently, I converted an Azure Function that used a C# script (*.csx) to a pre-complied class library using the Visual Studio Studio Tools for Azure Functions. It builds successfully in Visual Studio 2017 (as well as running and debugging too). I'd…
Ray
  • 187,153
  • 97
  • 222
  • 204
4
votes
0 answers

Add item to fsproj through dotnet CLI

I am using the dotnet CLI (v1.0.4) to create and manage projects. I have found the documentation for and have successfully created projects using the CLI with commands such as the following: dotnet new console -lang F# -o src/myConsoleApp I have…
BoJoe22
  • 85
  • 2
  • 9
4
votes
1 answer

'dotnet build' error after migrating dotnetcore project to 1.0.4

I've been trying to run the dotnet build command on a migrated .net core project (from 1.0.0-preview2-003131 to 1.0.4). I followed the steps for migrating the project mentioned here, and the solution builds using Visual Studio 2017. However, using…
Shubhang
  • 297
  • 1
  • 5
  • 13
4
votes
0 answers

dotnet nuget push fails when run from a Docker Build

I'm attempting to set up a CI pipeline for a dotnet library using docker and the dotnet cli. I'm running a docker build statement - building this dockerfile FROM microsoft/dotnet COPY . ~/dotnetapp WORKDIR ~/dotnetapp ARG NUGET_SOURCE ARG…
4
votes
0 answers

Visual Studio 2017 csproj - dotnet pack ProjectReference as exact version

I am trying to get dotnet pack to generate exact version references when creating NuGet packages. Let's say I have the following class hierarchy: api.csproj:
bperkins24
  • 41
  • 3
4
votes
2 answers

Nancy 500 server error with dotnetcore and kestrel

I am trying to use NancyFX (clint-eastwood) with dotnetcore1.1 and dotnet-cli 1.0.0-rc4-004771. My current project structure is - CustomBootstrapper.cs HomeModule.cs index.sshtml nancyapp.csproj Program.cs Startup.cs And codes are…
th1rdey3
  • 4,176
  • 7
  • 30
  • 66
4
votes
1 answer

Create a dotnet tool for EF Core data seed

As mentioned in this post I am seeding database data on the Startup of an ASP.NET Core project as follows: public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { using (var serviceScope =…
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
4
votes
2 answers

dotnetcore Nuget enable Pre-Release

I've started using dotnetcore for a hobby project. I'm having an issue trying to install NLog. The Visual Studio Code editor seems to recognise the beta version as the intelisense suggests it inside the project.json file. However nuget doesn't seem…
K-Dawg
  • 3,013
  • 2
  • 34
  • 52
4
votes
2 answers

Using f# on a mac with the dotnet cli

I was trying to follow https://github.com/enricosada/fsharp-dotnet-cli-samples/wiki/Getting-Started#hello-world to get started with f# and dotnet core on my mac. % mkdir helloworld % cd helloworld % dotnet new --lang "f#" Created new F# project in…
wirrbel
  • 3,173
  • 3
  • 26
  • 49
4
votes
0 answers

Change default .nuget/package folder .NET Core

Text from documentation: If not specified, the default NuGet package cache is used. It is found in the .nuget/packages directory in the user's home directory on all operating systems (for example, /home/user1 on Linux or C:\Users\user1 on…
Serhii Shemshur
  • 1,273
  • 3
  • 15
  • 21