I've been bashing my head trying to create a new project that's entirely .NET Core, a project that is runnable in different environments, but I need to add as references a lot of my previous projects that work in strict .NET Framework (4.5).
So far what I've been able to do was add the .NET 461 framework to project json,
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Niloosoft.Hunter.ServicesDataAPI": {
"target": "project"
}
}
},
"net461": { }
}
It succeeded in restoring packages and I even managed to add .NET framework references, but I can't seem to use them properly and I get this error.
So, my question is, is it currently possible to use my .NET Framework references without swapping the expected framework (as I want interoperability) with the following:
> #if NET45
//specific code for .NET 4.5
> #
Something to take note of, my projects are not supported by .NETCoreApp, so, I do need the .NET Framework I'm afraid, I just need to know if what I'm trying to do is possible.