Sdk: Publishing to a relative output folder omits entries from publishOptions

Created on 30 Jun 2016  路  11Comments  路  Source: dotnet/sdk

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

Most helpful comment

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.

All 11 comments

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.

I'm seeing this too. This appears to be a breaking change in RTM vs RC2.

I am almost sure this is the line that causes it to not work -https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.DotNet.ProjectModel/Files/IncludeFilesResolver.cs#L43

I think it should be removed or the path should be converted to absolute somewhere here:
https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-publish/PublishCommand.cs#L186

+1 to get this corrected. We're seeing the same issue.

:+1:

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.

@markrendle Me too, especially because it's an RC2 to RTM regression which affects functionality.

Bitten by this

Bitten by this too. Absolute paths work luckily.

Just tried this scenario with preview3:

  • dotnet new -t Web
  • dotnet restore
  • dotnet publish
  • dotnet publish -o ../out

Both publish folders contain wwwroot.

Give it a shot [grab the latest bits from https://github.com/dotnet/cli to try it before we officially ship] and let us know if you find additional issues.

Yes, the relative paths work. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmorriso picture fmorriso  路  3Comments

billwert picture billwert  路  3Comments

darrensimio picture darrensimio  路  3Comments

natemcmaster picture natemcmaster  路  3Comments

joffreykern picture joffreykern  路  3Comments