2

Please help to solve the problem,

I have a project, target framework is netcoreapp2.1. It works fine on my developer machine but fails with the following exception on target Ubuntu machine:

An assembly specified in the application dependencies manifest (CloudTester.Launcher.Service.deps.json) was not found:
    package: 'Microsoft.AspNetCore.Antiforgery', version: '2.1.1'
    path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'

On my developer machine I have the following

.NET Core SDKs installed:
  2.0.3 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]

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

On ubuntu I have the following:

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

It seems the problem is that on my developer machine

path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll' points to SDK folder, there this dll is present, but I don't want to install SDK on target machine!

Please help to understand what's going on and how to fix the problem

Alexander

Alexander
  • 81
  • 4
  • Have you had a look at this: https://stackoverflow.com/questions/48896443/an-assembly-specified-in-the-application-dependencies-manifest-was-not-fou I may not be right though but it may be worth a shot – Aiden Nov 11 '18 at 17:38
  • I tried, didn't help. It seems support for the PublishWithAspNetCoreTargetManifest property was removed. It from here https://github.com/aspnet/AspNetCore/issues/3310 – Alexander Nov 11 '18 at 19:00
  • Have you tried the nuget package instead? https://www.nuget.org/packages/Microsoft.AspNetCore.Antiforgery/ – Aman B Nov 11 '18 at 19:13
  • Yes, I tried to install Antiforgery package, it didn't help. I solved the problem by compiling my project directly on target machine, in that case it seems it correctly installs all needed dependencies and all workds fine. – Alexander Nov 18 '18 at 12:26

0 Answers0