Clear and concise tutorial or guide on updating .NET 4 Custom Activities to .NET 6 to work with Windows process versions

As the title suggests, I’m wondering if there is a clear and concise writeup or video on updating custom code that worked with legacy processes (.NET 4) to work with Windows processes (.NET 6). I could technically rewrite them, but I’d prefer if there was a good way to upgrade from one to the other if this is a mandatory step influencing us as this will likely be an issue going forward with later upgrades as well.

Thanks,
Mike

Hi Mike,

Yes, migrating custom code from legacy (.NET Framework) to Windows (.NET 6/7+) in UiPath is a common need now, as UiPath is aligning with modern .NET standards.

Here’s a clear and concise breakdown for you:


:white_check_mark: Migration Overview (Legacy to Windows - .NET 6)

  1. Project Compatibility

    • Legacy projects use .NET Framework (4.6.1)
    • Windows projects use .NET 6+ (cross-platform, modern runtime)
    • Direct upgrade is not possible – you need to create a new Windows-compatible project and migrate code manually.
  2. Steps to Migrate Custom Code:

    :brick: 1. Create a new Windows-compatible UiPath project

    • Open UiPath Studio
    • Choose “Process”
    • Under Compatibility, select “Windows” (not “Legacy”)

    :gear: 2. Update Dependencies

    • Use the Windows version of dependencies (many legacy packages are not compatible)
    • Remove or update any custom libraries that are still on .NET Framework

    :technologist: 3. Update Custom Code / Invoke Code Activities

    • Revisit any VB.NET / C# code
    • .NET 6 is stricter with types and may deprecate older APIs
    • Check for obsolete types/methods and replace with modern equivalents

    :puzzle_piece: 4. Update Custom Libraries

    • If you built any custom DLLs, recompile them in .NET 6
    • In Visual Studio, create a new .NET 6 Class Library, move your code there, and fix incompatibilities

    :white_check_mark: 5. Test Thoroughly

    • Some behaviors may change, especially with reflection, file handling, etc.
    • Test all logic paths after migration

:television: Good Resources

:link: UiPath Official Docs:

:movie_camera: Video:


:counterclockwise_arrows_button: Key Tip:

If you plan frequent upgrades in future, start using .NET 6-compatible Windows projects/libraries from now onward for maintainability.

Let me know if you want a migration checklist or code conversion help.

Hi @mike.vansickle

Are you refering to a specific activity within Studio when writing “custom code” (perhaps Invoke Code) or do you simply mean robots developed as legacy processes?

I have been through migrating a lot of processes, and the task can definently seem overwhelming, but there are ways to go about it.

  • Create a separate branch in your VCS for the migration
  • Migrate the process using the wizard
  • Use Validate Project to check for issues
  • If legacy dependencies are no longer valid try and find alternatives

Also there are several well written guides within the Forum, that you could use to troubleshoot.

Regards
Soren

1 Like

@mike.vansickle

You can check from about 50 minutes time stamp in the video where a hands on session of migration was done

Cheers

I’m not having issues migrating normal processes or libraries from Legacy to Windows. It has to do with the ChatGPT response above. I’m talking about custom activities created in Visual Studio under the .NET 4 framework. I want to know if there is a good easy way to upgrade that project from a .NET 4 framework to a .NET 6 framework.

Ah okay.

Unfortunately I am not the best candidate to answer that.
I have made a few rules for Workflow Analyzer in Visual Studio (C#), but this was done initially on a higher Framework.
I dont have any experience with entire libraries.

I hope you can make some sense of the ChatGPT reply :sweat_smile: I can see that several links are dead.

Regards
Soren