10

I`m trying to publish a self-contained app, made in .net-core, following the steps in https://learn.microsoft.com/en-us/dotnet/articles/core/deploying/index.

The repository with the code is in https://github.com/fontanaricardo/httpecho

I execute the commands:

$dotnet build -r debian.8-x64
$dotnet publish -c Release -r debian.8-x64
$docker build -t httpecho .

Starting the container:

$ docker run -p 5000:5000 httpecho
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.AspNetCore.Hosting.Abstracti
ons', version: '1.1.0', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll'

I'm doing something wrong?

Update

Open the file httpecho.deps.json, in publish folder, references the folder that not exists.

"runtime": {
      "lib/netstandard1.3/Microsoft.AspNetCore.Http.Abstractions.dll": {}
    }
Ricardo Fontana
  • 4,583
  • 1
  • 21
  • 32

1 Answers1

4

Your device have problem with proper distibute packages into your self contained publish (tried on my worked well). Try to fix packages by dotnet restore

Is there Microsoft.AspNetCore.Http.Abstractions.dll in debian.8-x64\publish? If not try to add manually (and all other missing *.dll's) and then try to run. If it will run without errors will be problem with proper distibute packages

J. Doe
  • 2,651
  • 1
  • 13
  • 31
  • Thanks for the answer, the `Microsoft.AspNetCore.Http.Abstractions.dll` is in the folder. I try to execute publish from the docker image `microsoft/dotnet:1.1.0-sdk-projectjson,` but the error persist. the file `httpecho.deps.json` reference the `lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll`. – Ricardo Fontana Mar 04 '17 at 00:42