diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/RemoteControl/RemoteControlGenerator.cs b/src/SourceGenerators/Uno.UI.SourceGenerators/RemoteControl/RemoteControlGenerator.cs index 79f4c8b1df25..e579923b8ae7 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/RemoteControl/RemoteControlGenerator.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/RemoteControl/RemoteControlGenerator.cs @@ -46,6 +46,7 @@ public class RemoteControlGenerator : ISourceGenerator "SolutionName", "VSIDEResolvedNonMSBuildProjectOutputs", "DevEnvDir", + "MSBuildVersion", }; public void Initialize(GeneratorInitializationContext context) diff --git a/src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.PartialReload.cs b/src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.PartialReload.cs index b2cd8b1af0c0..1b674d6773c4 100644 --- a/src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.PartialReload.cs +++ b/src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.PartialReload.cs @@ -29,10 +29,12 @@ private void InitializePartialReload() var unoRuntimeIdentifier = GetMSBuildProperty("UnoRuntimeIdentifier"); var targetFramework = GetMSBuildProperty("TargetFramework"); var buildingInsideVisualStudio = GetMSBuildProperty("BuildingInsideVisualStudio"); + var msBuildVersion = GetMSBuildProperty("MSBuildVersion"); _supportsPartialHotReload = buildingInsideVisualStudio.Equals("true", StringComparison.OrdinalIgnoreCase) && _forcedHotReloadMode is null or HotReloadMode.Partial + && (Version.TryParse(msBuildVersion, out var v) is false || v is not { Major: >= 17, Minor: >= 12 }) && ( // As of VS 17.8, when the debugger is attached, mobile targets don't invoke MetadataUpdateHandlers // and both targets are not providing updated types. We simulate parts of this process