Can I update to .Net 5 NuGet packages even if I'm using .Net Core 3.1?

后端 未结 3 751
野趣味
野趣味 2021-01-18 04:20

I was looking for some NuGet updates about my project libraries. I see that there are a lot of Microsoft libraries update to v5.0.0.

Based on my knowledge I t

3条回答
  •  孤城傲影
    2021-01-18 05:07

    I just finished the same. I had 3.1 core application with a lot of 3.1 and NET Standard2.0 libraries projects and just updated all these libraries to the version 5. All libraries were working ok, I could compile them. But I couldn't compile my main Web application. It started to give some strange errors that some staff needs .net5. Maybe it could be fixed but I didn't see much sense to waste my time since in any case I was planning to move to net5 in a couple of days. So I just decided to move to net5 immediately. I had installed net 5.0 SDK and change target framework of my application to net5.0. Now everything is working fine and I am happy with my net5.0 application. I have some Net 4.8 projects that use the same common libraries that I am using for Net Core. So these common libraries are targeted to netstandard2.0. and can't change them to Net5. Now all these Standard2.0 projects still work with my net5.0 web application without any problem. Since I didn't have any problems with my previous version 3.1.9 I DON'T RECOMEND to update libraries to 5.0 if YOU DON'T PLAN to move your application to Net5.0. You can get more problems after this then you can gain from this update.

提交回复
热议问题