'dotnet pack -o .' places NuGet packages in project folder
See original GitHub issueSteps to reproduce
dotnet pack -o . src\project\project.csproj
Expected behavior
NuGet packages are placed in current folder as specified with -o .
This worked properly using preview2 tooling (1.0.0-preview2-003131) and project.json.
Actual behavior
NuGet packages are placed in src\project
.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview3-004056)
Product Information: Version: 1.0.0-preview3-004056 Commit SHA-1 hash: ccc4968bc3
Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:18 (14 by maintainers)
Top Results From Across the Web
dotnet pack command - .NET CLI
The dotnet pack command builds the project and creates NuGet packages. The result of this command is a NuGet package (that is, a...
Read more >'dotnet pack -o .' places NuGet packages in project folder · ...
NuGet packages are placed in current folder as specified with -o . This worked properly using preview2 tooling (1.0.0-preview2-003131) and ...
Read more >Create a NuGet package with the dotnet CLI
Read a detailed guide about the process of designing and creating a NuGet package, including key decision points like files and versioning.
Read more >Include both Nuget Package References *and* project ...
Recently I have been trying to generate more Nuget packages for our dotnet core projects, utilizing the dotnet pack command. One issue I...
Read more >Add a package with a local package file in 'dotnet'
NuGet can only install and restore from feeds, so you'll need to add the directory where the package is in as a feed....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just hit this as well with
dotnet publish -o
. My opinion is the CLI should be taking relative paths and making them into full paths relative to the current working directory, then passing that into MSBuild.Every command-line application I am familiar with uses paths relative to the current working directory. Not relative to some arbitrary file it is operating on.
One last thing, if we ship 1.0 like this, it will be a breaking change to fix it the right way afterwards.
I think it makes sense for direct msbuild invocation and dotnet.exe invocation to differ here. In the msbuild case, there is an explicit /p argument, and so it seems reasonable that this works as it always has. But the help for dotnet -o says:
From that alone, it is more surprising that
-o .
does what it currently does.