简体   繁体   中英

.NET Core and .NET Framework interaction

We have a project that references multiple NuGet libraries requiring the .NET Framework. If we migrate to .NET Core, can we continue to use those NuGet libraries?

If I want to pass a Type object from .NET Core to a NuGet package using the .NET Framework, will that work?

If you migrate to .NET Core, all dependencies you use will have to target .NET Core too.

It is possible to reference libraries only for one type of framework, for example

"frameworks": {
  "dnx451": {
    "dependencies": {
      "Akka": "1.0.6"
    }
  },
  "dnxcore50": {
  }
}

and use #if DNX451 to include them in the code only when targeting the full framework

#if DNX451
Console.WriteLine(typeof(Akka.Actor.ActorBase));
#endif

It means however that the behavior provided by the library has too be implemented manually for .NET Core.

No

you will have to migrate your dependencies to dotnet core.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM