XAML Hot Reload under .NET MAUI not working for Windows platform, failing with missing dll file.

dg2k 1,386 Reputation points
2022-08-08T09:34:32.23+00:00

My XAML Hot Reload under Windows broke recently showing me a missing DLL file as shown in the screenshot below. All work fine for Android platform.

I attempted Visual Studio Repair and no luck. Also, Visual Studio got updated twice since this problem showed up (to Previews 5.0 and 6.0) and the problem till persists.

Indeed, the DLL file Xamarin.HotReload.Translations.resources.dll doesn't exist in the top directory, where as others exist in their respective locale folders. I would assume that the missing one is for the default language which should be for en or some variant of this. No clue how this file gone missing and no idea how to restore it. If Visual Studio Repair and updates doesn't restore, what will?

Any help to overcome this issue is much appreciated.

229091-image.png

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,923 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Gair Shields 6 Reputation points
    2023-02-12T18:01:01.3066667+00:00

    It seems that dll is always missing but normally you don't see the error with the default debug settings. The bug appeared for me after enabling the following.

    Break when exceptions cross AppDomain or managed/native boundaries (Managed only)

    There are 2 ways to workaround it. First is to disable that setting but if you want to keep it enabled, you can make a copy of Xamarin.HotReload.Translations.dll and rename it to Xamarin.HotReload.Translations.resources.dll. This will cause it to try and load the same dll twice which doesn't do any harm.

    1 person found this answer helpful.
    0 comments No comments