How to reference .NET framework from ASP.NET Core

前端 未结 2 1486
我寻月下人不归
我寻月下人不归 2021-01-23 06:03

I have a ASP.NET MVC 5 / .NET 4.7 project that I want to upgrade to ASP.NET Core.

The MVC frontend references a service layer project (SL) which in its that uses a datal

相关标签:
2条回答
  • 2021-01-23 06:23

    What framework should my projects target to be able to work together? Can we upgrade just one project to .NET Core and keep the rest in .NET Framework?

    You don't need to make any of your projects target .NET Core in order to use ASP.NET Core. I'd recommend using the .NET Core SDK (and associated csproj file format) but you can set the target framework to a desktop framework version (e.g. net47) and then you should be fine.

    0 讨论(0)
  • 2021-01-23 06:43

    If you want to switch to .NETCore and still be able to use older libraries you should tagret .NETFramework.
    So when creating new project select:

    ASP.NET Core Web Application (.NET Framework)

    In addition this month(actually yesterday) .NETCore 2.0 along with EFCore 2.0 is released. Both frameworks have much more features, so I suggest migrating to 2.0 project.
    Also EFCore 2.0 should now have most features that were needed so I would go with that as well.

    0 讨论(0)
提交回复
热议问题