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

"The library 'hostpolicy.dll' required" if run from deploy folder, but emitEntryPoint is true

I created a Web API project using the default ASP.NET Core Web Application (.NET Framework) template and then published to local folder using VS. Now if I call dotnet application.exe in the console, I receive the following error: A fatal error was…
Set
  • 47,577
  • 22
  • 132
  • 150
6
votes
1 answer

dotnet watch ignores portnumber launchsettings.json after upgrade to .NET 6

When I run my ASP.NET Core (Blazor Server) app using Visual Studio, it listens on port 5003, when using dotnet watch --project app\App.csproj run, it listens on different port - 5001! Here is my launchSettings.json "App": { "commandName":…
Liero
  • 25,216
  • 29
  • 151
  • 297
6
votes
1 answer

Can `dotnet fsi` be run in .NET Framework mode?

I'd like to reference some .NET Framework-only packages from an F# script, and run it using: dotnet fsi script.fsx I'm getting the following error message: warning NU1701: Package 'Hymans.ESF.Api 1.9.0' was restored using…
Mark Pattison
  • 2,964
  • 1
  • 22
  • 42
6
votes
0 answers

How to append nightly build date to VersionSuffix for a .NET Core 3.1 Visual Studio 2019 project using GitHub Actions?

I want to define my software's version number manually by hand within the source code. At least the major, minor, and patch version components (terminology taken from Semantic Versioning 2.0.0). However, for the build metadata, and .NET's assembly…
burnersk
  • 3,320
  • 4
  • 33
  • 56
6
votes
0 answers

"dotnet build" fails: "Solution file error MSB4249: Unable to build website project"

Besides .net core 2.2 projects, my solution file contains a website project. When I am in Visual Studio and I run "Rebuild Solution" everything builds successfully, including the website. In the build output, I see: >Validating Web Site 9>Building…
John Pankowicz
  • 4,203
  • 2
  • 29
  • 47
6
votes
2 answers

Having a sln file, possible to list all files from all projects under that sln?

Is there a way or an extension that does the following: Having a *.sln file, can I list all files from all projects or all solution folders under that sln? So if I do dotnet sln list then I get the list of the projects from that solution file, but…
Adrian Iftode
  • 15,465
  • 4
  • 48
  • 73
6
votes
4 answers

How to run dotnet test on VSTS with custom NuGet feed?

We have a project with a dependency on a custom NuGet feed (also hosted in VSTS). I'm trying to put together a new phase to generate code coverage reports, as in this blog post. My new phase looks like this: And is made up of the following…
6
votes
2 answers

Pass msbuild parameters to dotnet run command

We can pass msbuild arguments to dotnet build: dotnet build MyApp.csproj /p:SolutionDir=C:\MyApp How can we do the same with dotnet run? This does not work: dotnet run MyApp.csproj /p:SolutionDir=C:\MyApp The use case we have in mind is to use…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
6
votes
1 answer

How to ignore MSB4011 when running dotnet build

When I run dotnet build I get this warning many times: C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CrossTargeting.targets(145,3): warning MSB4011: "*.fsproj.proj-info.targets" cannot be imported again. It was already imported at…
Wallace Kelly
  • 15,565
  • 8
  • 50
  • 71
6
votes
2 answers

What are the differences between a dotnet cli and a angular cli basic project template?

When I generate a new Angular 4 project using dotnet new angular and ng new, what are the chief differences between the two generated projects? I have done a folder compare which was very quick and told me they have a few differences on that level.…
ProfK
  • 49,207
  • 121
  • 399
  • 775
6
votes
4 answers

.NET Core - MSB3277: Found conflicts between different versions

I am having difficulty getting rid of the build warning: warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved specifically in .NET core projects. In a full .NET framework project I…
Stewart_R
  • 13,764
  • 11
  • 60
  • 106
6
votes
3 answers

Update dotnet cli in Mac OSX

Im'm trying to upgrade my dotnet cli. I have installed in my Mac (OS El Capitan) from the official link. But when I try to view the version with this code: dotnet --version My output: 1.0.0-preview2-003121 How can I upgrade?
chemitaxis
  • 13,889
  • 17
  • 74
  • 125
6
votes
3 answers

dotnet run web site with specific url

How can I specify using dotnet cli to run my web app using specific configurations. I know hosting.json can be used but I did not find any documentation how to do this and how this relates to the dotnet cli.
mbr
  • 73
  • 1
  • 1
  • 4
5
votes
2 answers

how can i update all my nuget dependencies at once using command line?

my projects has more than 400+ dependencies and I have to update all of them at once with command in .NET 7.0 . I have try nukeeper,dotnet-outdated-tool and NuPu. nukeeper and dotnet- outdated is already deprecated and Nupu is used to update…
Rahul Dave
  • 51
  • 1
5
votes
2 answers

Working directory parameter of DotNetCoreCL Publish step

I have a repository with many solutions in it. I'd like to set up a build pipeline in Azure DevOps and build specific solution. I only need the "standard" steps as "restore packages, build, run unit tests, publish". However, the "publish" step gives…
Peter Szekeli
  • 2,712
  • 3
  • 30
  • 44