Sdk: publishOptions include is not honored when relative output path is specified with dotnet publish on Linux

Created on 28 May 2016  Â·  4Comments  Â·  Source: dotnet/sdk

Steps to reproduce

  1. Prepare a Ubuntu 16.04 machine with DotNet CLI, Node.js, Bower, Gulp installed.
    Here are the steps I used:
    DotNet CLI:
    Install a required package:
    wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb
    sudo dpkg -i libicu52_52.1-8ubuntu0.2_amd64.deb

    Install DotNet CLI from https://www.microsoft.com/net/core#ubuntu

    Node.js, Bower, Gulp:

    curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
    sudo apt-get install -y nodejs
    sudo npm install -g bower
    sudo npm install -g gulp

  2. Download the web application WebApplication1.tar.gz to the Linux machine and unzip it.
  3. Navigate to the project folder, e.g. ~/repos/WebApplication1/src/WebApplication1.
  4. Run dotnet restore && dotnet publish -o ./publishoutput/

    Expected behavior

appsettings.json, wwwroot, Views and web.config are copied into the publishoutput folder when publishing is done.

Actual behavior

appsettings.json, wwwroot, Views and web.config are not copied.

Note that if I specify an absolute path as the publish folder like ~/repos/WebApplication1/src/WebApplication1/publishoutput/, it works as expected.

Environment data

dotnet --info output:

Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e

Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64

Most helpful comment

Same issue on 1.0.0-preview2-003121

All 4 comments

Same issue on Windows 10.
If output-path option is relative, publish includes are not copied but it works with an absolute path.

With following dotnet-cli :

.NET Command Line Tools (1.0.0-preview2-002886)

Product Information:
 Version:            1.0.0-preview2-002886
 Commit SHA-1 hash:  0e60890be2

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Same issue on 1.0.0-preview2-003121

I am experiencing it on win8.1 enterprise with preview2 tools.
Apparently if a relative output path is used (-o) it generates a different set of files which will render the IIS request like this:

HTTP Error 502.5 - Process Failure

Common causes of this issue:

The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port

Troubleshooting steps:

Check the system event log for error messages
Enable logging the application process’ stdout messages
Attach a debugger to the application process and inspect

For more information visit: http://go.microsoft.com/fwlink/?LinkID=808681

Fixed in preview3. The change was quite fundamental, however, so let us know if you're still experiencing this issue. We've tested a few flavors of --output problems and they worked quite nicely :)

Was this page helpful?
0 / 5 - 0 ratings