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.

Publishing to a relative output folder omits entries from publishOptions

See original GitHub issue

Steps to reproduce

I have created a fresh “ASP.NET Web Application (.NET Framework)”, navigated to the folder in a console and ran

  • dotnet publish -o ..\..\..\..\..\..\tmp\publish -c Release or
  • dotnet publish -o C:\Users\[...]\tmp\publish -c Release

Expected behavior

Both commands should produce identical results

Actual behavior

The first command doesn’t copy the wwwroot and Views folders in the output folder

Environment data

.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:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
joaomello-zzcommented, Jul 5, 2016

I had the same issue. If I use dotnet publish -c release --output ".\publish" - not work. If I use dotnet publish -c release --output publish - work.

2reactions
markrendlecommented, Oct 4, 2016

Find it slightly disturbing that such a fundamental bug has existed for so long, across multiple releases, and has no comment from any team members.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet publish with relative path not respecting ...
The includes folders are copied across to the publish directory. The expected output is the same as running the command with a full...
Read more >
Found multiple publish output files with the same relative ...
Issue: The issue raises after .NET 6 migration. There's a new feature that blocks multiple files from being copied to the same target ......
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 >
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 >
How to use relative path for publishing destination?
I need to use a relative path to publish PDF output to the same directory level as my project's directory. Hardcoding the path...
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