.NET 4.5.1 versus .NET Core 5

We want to use the "vNext" technology in our next project.

DLL Compatibility

For me it looks like we can only use the framework version 4.5.1 when we rely on libraries like Serilog or mongoDB that have dependencies on older Framework Versions. Is this really true or is there a way to have dependencies that rely on the full old framework version and the project itself depends on .NET Core 5.0?

Jon Skeet
people
quotationmark

(Only answering the first of your questions as the second seems too broad and/or vague...)

Is this really true or is there a way to have dependencies that rely on the full old framework version and the project itself depends on .NET Core 5.0?

Yes, it's really true - and makes perfect sense, IMO. You're saying "I want my app to be able to run on .NET Core." How is that going to work if some of the libraries you're depending on try to use features that don't exist in .NET Core?

I suspect this will get a lot better soon though - as soon as things have stabilized a bit and it's easier for open source projects to build .NET Core-enabled NuGet packages, I'd expect most projects that aim for portability to do their best to support it.

(Part of this will depend on tooling though - I gather that right now the only way of building a package which works with .NET Core is to use a vNext-style project, rather than a "regular" VS class library project with a specific PCL profile. I hope this will change, but we'll see.)

people

See more on this question at Stackoverflow