[AOT] clean up AOT issue in Settings.UI (#36559)

* Rename source generation context file

* fix build issue

* fix path bug

---------

Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
This commit is contained in:
moooyo
2025-02-25 02:48:54 +08:00
committed by GitHub
parent 9f008a65d6
commit f81f65db3d
45 changed files with 203 additions and 98 deletions

View File

@@ -11,10 +11,11 @@ using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands;
using Microsoft.PowerToys.Settings.UI.SerializationContext;
namespace Microsoft.PowerToys.Settings.UI.ViewModels
{
public class RegistryPreviewViewModel : Observable
public partial class RegistryPreviewViewModel : Observable
{
private GeneralSettings GeneralSettingsConfig { get; set; }
@@ -121,7 +122,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
CultureInfo.InvariantCulture,
"{{ \"powertoys\": {{ \"{0}\": {1} }} }}",
RegistryPreviewSettings.ModuleName,
JsonSerializer.Serialize(_settings)));
JsonSerializer.Serialize(_settings, SourceGenerationContextContext.Default.RegistryPreviewSettings)));
}
}
}