Rhett Leech
Rhett Leech

Reputation: 145

How to fix missing .deps.json dependencies manifest in .NET Core Console Application

This is my first .NET Core Console App and I am having problems running the application on a server. The exe runs fine from my local computer but when ran from a Windows Server 2008 r2 SP1 I get the following error:

D:\ScheduledTasks\NotificationSender>NotificationSender.exe
Error:
  An assembly specified in the application dependencies manifest (NotificationSender.deps.json) was not found:
package: 'Microsoft.Extensions.Configuration.Abstractions', version: '2.2.0'
    path: 'lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll'

I have manually installed the .NET Core 2.2.4 Runtime (dotnet-hosting-2.2.4-win.exe) onto the server and confirmed that my local has the same.

D:\ScheduledTasks\NotificationSender>dotnet --info

Host (useful for support):
  Version: 2.2.4
  Commit:  f95848e524

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

I have .NET Framework 4.6.1 installed on the server which should over my requirements

Googling I find fixes for the ASP Core manifest (i.e. https://www.benday.com/2018/02/23/force-dotnet-publish-to-publish-dependencies-using-publishwithaspnetcoretargetmanifest/) but none for console applications

Do I have to install .NET Standard separately to .NET Core 2.2? Is there a play to forcefully include the dependant files?

I presume I am just missing something basic. Any help would be appreciated.

Thanks

Upvotes: 1

Views: 11669

Answers (1)

Rhett Leech
Rhett Leech

Reputation: 145

The issue was that the publish was building to the following locals

\NotificationSender\bin\Release\netcoreapp2.2\win-x64

and

\NotificationSender\bin\Debug\netcoreapp2.2\publish

I was simply using the wrong folder

Upvotes: 1

Related Questions