且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

.NET v2.0到v4.6.2

更新时间:2023-02-14 22:57:08

只需将每个项目更改为目标.NET 4.6.2,然后重新编译即可。在大多数情况下,一切都应该按原样运作。运行你的测试,然后像往常一样进行回归测试,你应该没问题。

Just change each project to target .NET 4.6.2 and then recompile. For the most part everything should just work as is. Run your tests and then do regression testing like you normally would for a release and you should be fine.

另请注意,如果你依赖任何NuGet包,那么你很可能需要删除并将它们添加回来。如果您使用的是针对特定框架的NuGet包,然后切换到较新的CLR版本(例如
CLR v2到v4),则VS会报告警告。删除和添加回包可以解决问题。 

Also note that if you depend upon any NuGet packages then you will most likely need to remove and add them back. VS tends to report warnings if you are using a NuGet package that targets a specific framework and then you switch to a newer CLR version (e.g CLR v2 to v4). Removing and adding back the packages resolves the issue.