none
.NET v2.0 to v4.6.2 RRS feed

  • Question

  • Hi guys,

    Currently, our client's apps (c# codes) are compiled in .NET 2.0, and recently our client wanted us to upgrade to .NET v4.6.2.

    As I am new to this tech refresh of converting code from v2.0 to 4.6.2, would like to seek help from those who had experienced in upgrading of .NET version. Typically what are the procedure I need to take care of?

    Any useful inputs from the community are welcome, Thanks guys!

    Wednesday, August 8, 2018 8:12 AM

All replies

  • 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.

    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. 


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, August 8, 2018 1:57 PM
    Moderator
  • Hi Kentan2608,

    Here is a document about Migration Guide to the .NET Framework 4.7, 4.6, and 4.5.

    If you upgrade your app to .net 4.6.2, maybe some changes in the .NET Framework require changes to your code. you could check the following Migration resources.

    1. See Versions and Dependencies to understand the CLR version underlying each version of the .NET Framework and to review guidelines for targeting your apps successfully. 
    2. Review Application Compatibility to find out about runtime and retargeting changes that might affect your app and how to handle them. 
    3. Review What's Obsolete in the Class Library to determine any types or members in your code that have been made obsolete, and the recommended alternatives. 
    4. See What's New for descriptions of new features that you may want to add to your app. 

    https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 9, 2018 1:52 AM
    Moderator