Error: assembly specified in the dependencies mani

2019-07-19 18:21发布

问题:

When I try to deploy the console core app, I'm getting the error:

Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.aspnetcore.hosting.abstractions', version: '1.0.0', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll'

I can see that Microsoft.AspNetCore.Hosting.Abstractions.dll exists in lib/netstandard1.3/Microsoft.AspNetCore.Hosting.Abstractions.dll. Is there a way to get the path?

回答1:

If we are using TFS 2013, then the work around was to create a folder and add all the nuget packages required in the folder.

Copy that folder to the server where it has to be deployed and copy all the dlls of the project.

Also change the path in .runtimeconfig.dev.json file in the below variable.

  "additionalProbingPaths": [
  "<nugetfolderpath>"
  ]

Make sure to use two forward slashes in the path. ex: C:\ProjectName\NugetFolder