12

Im just trying to run a DotNet Core console app on a Windows Server 2012 R2 but I keep getting this error:

Error: An assembly specified in the application dependencies manifest (Application.deps.json) was not found: package: 'Microsoft.Web.Administration', version: '11.1.0' path: 'lib/netstandard1.5/Microsoft.Web.Administration.dll'

The dll that is missing is inside the /publish folder... I used Dotnet publish with the correct Runtime Identifier (win81-x64)

I installed the Dotnet runtime 2.0.7 on the server

Vincent Rutten
  • 333
  • 1
  • 2
  • 8

2 Answers2

17

Always use the publish output when deploying to a target sever.

It can be found in

bin\Release\netcoreapp2.0\win81-x64\publish

in your case (self-contained application)

or in

bin\Release\netcoreapp2.0\publish

for framework-dependent deployments.

The output in the directories above are meant to be used in development only, since they are specific to machine and user configuration built with.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217
  • 1
    Just had a similar problem. Specifically: An assembly specified in the application dependencies manifest (StatProcessing.deps.json) was not found: package: 'Microsoft.AspNetCore.Http.Abstractions', version: '1.1.2' path: 'lib/netstandard1.3/Microsoft.AspNetCore.Http.Abstractions.dll' I resolved it by setting up a publish operation on my development system to produce a Win10x-64 build. Once I did that and then deployed to my server, it started to work. Thanks @martin. – Wallace B. McClure Dec 14 '18 at 15:58
1

I had this issue because I deployed the wrong publish folder.

I decided to take the time a setup a publish profile.
In solution Explorer...Right Click on the Project -> Publish
or from the menu Build->Publish

.NET Core application publishing overview

Using a publish profile you can set the target location to something simple

drive:\Publish\[project]

This will save you from haveing to navigate 10 levels deep an possibly copying the wrong folder.

Deploy .NET Core apps with Visual Studio

Chris Catignani
  • 5,040
  • 16
  • 42
  • 49