简体   繁体   中英

Can I use a project targetting .NET Framework as a dependency of another a project targetting .NET Core?

I have a VS solution containing some projects to be migrated to .NET Core. One of these projects have a dependency (another project within the solution) that is targeting .NET Framework; so what I want is to use .NET Core in the project to be migrated and leave the dependency project as-is (ie targetting .NET Framework).

Is that possible?

I think the best way is to convert your dependency project to .NET standard. NET Core doesn't support inclusion of .NET Framework libraries. However, .NET Core and .NET framework both supports .NET Standard, you can convert your dependency project to .NET standard.

The other way specified here is to use API approach.

Is it possible to reference .net framework 4.7.2 class library from an ASP.NET Core MVC project?

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