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 binDebug
etcoreapp1.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 ?
--- EDIT ---
Tried to setup a nuget package with my dll, getting the following error when trying to import:
The package ApHelperSock 1.0.0 isn't compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). The package ApiHelperSock 1.0.0 supports: net (.NETFramework,Version=v0.0)
Tried to create a .NETFramework library project, import here and then call the library from my aspnetcore app, without success.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…