This assembly was expected to be in the local runtime store

1

I am trying to execute an api made in net core 2. I installed the netcoresdk but when I try to execute it I get the following error:

  

An assembly specified in the application   (ApiCasalSajumabavi.deps.json) was not found:       package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1'       path: 'lib / netstandard2.0 / Microsoft.AspNetCore.Antiforgery.dll' This assembly was expected to be in the local runtime store as the   application was published using the following target manifest files:       aspnetcore-store-2.0.3.xml

I have also copied the store folder from / usr / share / dotnet / store and the folder / usr / share / dotnet / additionalDeps in the directory where the api is published and it still does not work I do not know what else to do. Any help is good. Thanks.

    
asked by ricky 24.04.2018 в 11:12
source

1 answer

1

I answer my question.

The problem was a version difference between the packages provided by the netcoresdk of Microsoft (present in / usr / share / dotnet / store on ubuntu 16.04.03) and the packages required by the web api when you have installed the nuget package Microsoft.AspNetCoreAll in its latest version.

I have solved it by making a downgrade of this last package to version 2.0.0.

Note: It is not necessary to copy the store folder, or any other folder, to the folder where the project is published.

    
answered by 24.04.2018 в 11:43