.netasp.net-core.net-coreautodesk-navisworks

How to Share Classes Between .Net Core project and .Net Framework 4.5 Project?


I am working on a project that requires use of Navisworks .Net API (4.5) and a ASP.NET Core. I would like to share some of my types between these two but my trial of creating a portable library that targets .Net Core 1.0 and .Net Framework 4.5 and referencing this from both other projects failed. Navisworks API did not like that and it throws an exception which I can't get the details.

Is there a solution for what I am trying to achieve?


Solution

  • .Net Framework 4.5 supports .Net Standard 1.1 (and newer versions of .Net Framework support newer versions of .Net Standard), so creating a .Net Standard 1.1 library should work for you.

    Though I believe there are issues with referencing a project.json projects from csproj projects, so you might have to use the library as a NuGet package.

    Other options: