Uno Platform - Hot Reload & Windows Development

I am currently developing a project using Uno Platform & .NET 8.0. I’ve used VS Code on Linux to create the project using the ‘Torizon IDE Extension’ and I’ve created a few screens in XAML to test out the project, which led me to 2 questions:

  1. Is there a way to use the Hot Reload feature locally on Linux?
  2. Is there a way to run the project in Windows as well as Linux? The Torizon Toradex template doesn’t seem to easily allow it. I would like to have the option to develop the project using Visual Studio 2022 on Windows as its more convenient than developing on a Linux VM. Uno is meant to be cross-platform, so I’m assuming there’s a way to configure it to work on Toradex and Windows.

Building the project after every minor UI change feels like such an outdated route when Hot Reload is available.

I’m new to using Toradex, so any help is appreciated!

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the provided context, here are the answers to your questions:

  1. Hot Reload Feature Locally on Linux: The context mentions that it is possible to run the application in Debug mode locally on the development PC using Visual Studio Code. You can select the target .NET Launch (Skia Uno Platform) to run, debug, and hot reload locally. This suggests that you should be able to use the Hot Reload feature locally on Linux by following these steps in Visual Studio Code.

  2. Running the Project on Windows and Linux: The context does not provide specific details about running the project on both Windows and Linux using Visual Studio 2022. However, it does mention the use of Visual Studio Code with the Torizon IDE Extension for development on Linux. Since Uno Platform is cross-platform, it should theoretically be possible to configure your project to work on both Toradex and Windows. You might need to set up a similar development environment on Windows, possibly using Visual Studio Code or Visual Studio 2022, and ensure that your project files and dependencies are compatible across both platforms.

If you need more specific guidance on setting up Visual Studio 2022 for this purpose, additional resources or documentation from Uno Platform or Toradex might be required.

Please, also check if these links can help you solve your problem:

https://wiki.archlinux.org/title/Arduino

Visual Studio Code IDE Extension | Toradex Developer Center.

Hi @lajailat_gandh !

Sorry for the delay here, but ToradexAI got it mostly right! (except for the Arduino reference :stuck_out_tongue: )

I just tested it and it works. Are you facing some specific issue? If yes, please share more details of what is happening :slight_smile:

This is a tough question.

Although Uno Platform is indeed meant to be cross-platform and it implements the same XAML “contract” as Microsoft’s, you might face differences between platforms. To know about the actual differences, you can refer to Uno Platform’s documentation: Uno Platform Documentation. And maybe also their repository on Github: unoplatform/uno · Discussions · GitHub.

So the answer can be “yes, but depends” :sweat_smile:

If you are using stuff that has the same behavior on both, seems like it should be possible. But please not that I am not a .NET/C#/Uno Platform developer.

Best regards,

Hi @henrique.tx !

Sorry for the 5 month delay, I didn’t realise that someone responded to me :sweat_smile:

Yes, I’m still facing issues with Hot Reloading. I would like to hot reload when connected remotely to the Torizon board, as well as, hot reload when I build locally on the PC (which as far as I’m aware isn’t possible).

Remote hot reload is not working for me.

The furthest I’ve reached with hot reload is when I build locally on the PC, VS Code detects a file change and rebuilds the entire project, which isn’t true hot reload.

Can you please share the steps you do or configuration of the project that allows you to hot reload?

Your help is much appreciated, thanks!

Hi @lajailat_gandh !

Welcome back :smiley:

I need to check internally if there is something that can be done to have hot reload working remotely on the module. I tried following the tips from the documentation of the Uno Platform Framebuffer template’s specific tasks (vscode-torizon-templates/dotnetUno5FrameBuffer/.doc/README.md at v2.8.1 · torizon/vscode-torizon-templates · GitHub), but I didn’t manage to make it work.

Also, it is important to align expectations around Uno Platform template: its maintenance is currently community driven (as stated in GitHub - torizon/vscode-torizon-templates at v2.8.1). Therefore, it might not be as mature as the Toradex-maintained templates.

Looking into the future, Uno Platform templates will be removed and ones related to Avalonia will be promoted to Toradex-maintained (as we can see in GitHub - torizon/vscode-torizon-templates: VS Code Torizon Integrated Development Environment Templates).

Having said that, I will check internally it/how it is possible to get hot-reload working on the module.

Best regards,

Hi @lajailat_gandh !

Are you perhaps using Torizon OS 7 with the Uno Platform template?

Since the Uno Platform template is not officially supported on Torizon OS 7, could you please try on Torizon OS 6?

Best regards,

Hi @lajailat_gandh !

Do you have any updates regarding this topic?

Best regards,

Hi @henrique.tx,

I am using Torizon 6.6.1.

Unfortunately, I haven’t been able to test the remote hot-reload as I have been struggling with another issue connecting to the device after getting a new laptop. I’ve just posted the issue here:

Would you say that Avalonia is better maintained with Toradex? Would you recommend switching to Avalonia in that case, and is the switch for an existing project easy?

Thank you for your help this far, its appreciated!

Hi @lajailat_gandh !

Avalonia templates are the ones maintained (as previously shared) and Uno Platform template is not going to be maintained by Toradex.

If you want to count on Toradex-maintained templates, then the best thing is indeed to move over to Avalonia.

As we don’t have much experience specifically on development using C# and its frameworks, it is hard for me to affirm anything about project migration.

If you would like extensive support in the realm of C# application development, we could try to find a Toradex Partner (Embedded Computing | Hardware & Software Service Partners) that could provide you further support. If you have interest in it, just let us know :slight_smile:

Best regards,

1 Like