Skip to main content
1 of 3
Lucas Freitas
  • 1k
  • 4
  • 16
  • 41

.NET Core - Coult not load file or assembly

I'm trying to use a custom DLL (4.5 framework) in a aspnet core 1.1 app.

I'm using Microsoft.NETCore.Portable.Compatibility

When I run the project and try to make a call at some class of the library project, vs2017 throw the following exception.

Could not load file or assembly 'ApiHelperSock, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. O sistema não pode encontrar o arquivo especificado. 

If I check the bin\Debug\netcoreapp1.1 I can see my dll here.

This is my project.json file

{ "compilerOptions": { "noImplicitAny": false, "noEmitOnError": true, "removeComments": false, "sourceMap": true, "target": "es5" }, "exclude": [ "node_modules", "wwwroot" ] } 

Any ideas ?

Lucas Freitas
  • 1k
  • 4
  • 16
  • 41