Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

dotnet publish fails when building in container #237

Closed
carsten-j opened this issue May 23, 2017 · 3 comments
Closed

dotnet publish fails when building in container #237

carsten-j opened this issue May 23, 2017 · 3 comments
Labels
closed-by-design Closed because the product is working as designed.

Comments

@carsten-j
Copy link

For a out of the box created ASP core 2.0 web api I cannot build the app in the aspnetcore-build container. I get the following error message:

Step 8/8 : RUN dotnet publish --output /out --configuration Release
 ---> Running in 513b448306ea
Microsoft (R) Build Engine version 15.3.117.23532
Copyright (C) Microsoft Corporation. All rights reserved.

/usr/share/dotnet/sdk/2.0.0-preview1-005977/Microsoft.Common.CurrentVersion.targets(2867,5): error MSB3552: Resource file "**/*.resx" cannot be found. [/myApp.csproj]
The command '/bin/sh -c dotnet publish --output /out --configuration Release' returned a non-zero code: 1

Steps to reproduce the issue

  1. Clone the repository https://github.com/carsten-j/myApp
  2. Run docker build -t myapp ,

Expected behavior

No error message from dotnet publish

Actual behavior

The error listed above

Additional information (e.g. issue happens only occasionally)

This does not happen on my local machine.

Output of dotnet --info

.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983
@natemcmaster
Copy link
Contributor

natemcmaster commented May 23, 2017

We've had some weird errors like this one caused by working from /. Can you try adding this as the second line in your Dockerfile?

WORKDIR /app

@carsten-j
Copy link
Author

That solved the problem. Thanks.

@natemcmaster
Copy link
Contributor

👍 I'm going to add this to our docs and readme to make this more clear.

@natemcmaster natemcmaster added the closed-by-design Closed because the product is working as designed. label Jul 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
closed-by-design Closed because the product is working as designed.
Projects
None yet
Development

No branches or pull requests

2 participants