Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
403 views
in Technique[技术] by (71.8m points)

c# - Are netcoreapp3.1 packages compatible with net5.0?

I have a set of C# projects that currently have netcoreapp3.1 as TargetFramework. They get published to nuget.org as multiple libraries and one executable .NET Core Global Tool.

Some clients of my library want to switch to net5.0, but then it seems that they need both runtimes (net5.0 and netcoreapp3.1) installed. Is there no backwards compatibility for net5.0 projects to use netcoreapp3.1 libraries?

If I would switch my libraries to net5.0, I suppose that this would break clients that still use netcoreapp3.1, right?

I found out that I could set <TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>, but it would be nice to avoid always having to compile and publish separate binaries for multiple framework versions. Is that possible?

question from:https://stackoverflow.com/questions/65862638/are-netcoreapp3-1-packages-compatible-with-net5-0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...