question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

publish command not copying files to specified output directory

See original GitHub issue

Steps to reproduce

"publishOptions": { "include": [ "**/*.json" ] }

dotnet publish --configuration Release --version-suffix 45 --output ./bin/output

Basically just override the default output directory

Expected behavior

new folders should be created in the specified output directory

Actual behavior

only dlls/pdbs are being copied. No new folders are being created.

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview2-003121)

Product Information: Version: 1.0.0-preview2-003121 Commit SHA-1 hash: 1e9d529bc5

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64

I am seeing files copied correctly using the default output directory.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
jonaskellocommented, Apr 5, 2017

I have the same issue when using the image microsoft/aspnetcore-build:1.1.1 and running dotnet publish src/MyProj --output out --configuration Release. Running on ubutnu. Nothing gets copied and no error messages.

EDIT: It works but I was confused by the fact that the output option path is relative to the project path, not the current working dir. Sorry for the noise.

3reactions
urbanhuskycommented, May 3, 2017

The only hint currently is that the defaults are relative to the project.

dotnet publish -o did not treat relative paths relative to the project but to the current directory in previous versions (migrated from 1.1 preview 2.1)

Read more comments on GitHub >

github_iconTop Results From Across the Web

publish command not copying files to specified output ...
I am seeing files copied correctly using the default output directory.
Read more >
asp.net core - dotnet publish won't copy files with copy task
I'm trying to customize my *.pubxml profile of a ASP.NET Core project. To find out how it actually works I tried to copy...
Read more >
dotnet publish command - .NET CLI
To make publish output go to separate folders for each project, specify a relative path by using the msbuild PublishDir property instead of...
Read more >
Keeping Content Out of the Publish Folder for WebDeploy
I've run into issues with keeping files from publishing with WebDeploy on numerous occasions. When working with large projects it's not ...
Read more >
Msbuild get directory name. props imported, or something ...
The dotnet publish command accepts MSBuild options, such as -p for setting ... 1 Specify build directory name. exe and its dependencies are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found