dotnet publish with relative path not respecting PublishOptions Include
See original GitHub issueSteps to reproduce
In an asp.net project add directories into the PublishOptions Include setting in the project.json.
e.g.
"publishOptions": { "include": [ "wwwroot", "app", "Views", "appsettings.json", "web.config" ] },
Then publish using donet CLI.
e.g.
dotnet publish --framework net46 --output "..\..\..\someRelativeDir" --configuration Debug
Expected behavior
The includes folders are copied across to the publish directory.
The expected output is the same as running the command with a full path.
e.g.
dotnet publish --framework net46 --output "c:\temp\myFullPathDir" --configuration Debug
Actual behavior
The directories specified in the publishOptions includes are not copied.
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: Windows OS Version: 6.3.9600 OS Platform: Windows RID: win81-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:10 (1 by maintainers)
Top GitHub Comments
I have another reproduction scenario.
This does not work (wwwroot is not included):
dotnet publish -c Release -o .\.out
But this works:dotnet publish -c Release -o .out
Yep, MSBuild has a much stronger globbing functionality. I’m unable to repro this in preview3. Please re-open if you still see this.