Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable HotReload #362

Merged
merged 6 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Uno.Templates/Uno.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<PropertyGroup>
<UnoExtensionsVersion Condition="'$(UnoExtensionsVersion)' == ''">3.0.0-dev.2335</UnoExtensionsVersion>
<UnoVersion Condition="'$(UnoVersion)' == ''">5.0.0-dev.3597</UnoVersion>
<UnoVersion Condition="'$(UnoVersion)' == ''">5.0.13</UnoVersion>
<UnoExtensionsLoggingVersion Condition="'$(UnoExtensionsLoggingVersion)' == ''">1.6.0</UnoExtensionsLoggingVersion>
<SkiaSharpVersion Condition="'$(SkiaSharpVersion)' == ''">2.88.6</SkiaSharpVersion>
<UnoCoreExtensionsLoggingVersion Condition="'$(UnoCoreExtensionsLoggingVersion)' == ''">4.0.1</UnoCoreExtensionsLoggingVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"profiles": {
"MyExtensionsApp._1.Windows (Package)": {
"commandName": "MsixPackage"
},
"MyExtensionsApp._1.Windows (Unpackaged)": {
"commandName": "Project"
"profiles": {
"MyExtensionsApp._1.Windows (Unpackaged)": {
"commandName": "Project"
},
"MyExtensionsApp._1.Windows (Package)": {
"commandName": "MsixPackage"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
MainWindow = Microsoft.UI.Xaml.Window.Current;
#endif

#if DEBUG
MainWindow.EnableHotReload();
#endif

//+:cnd:noEmit
#if mauiEmbedding
//-:cnd:noEmit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
);
MainWindow = builder.Window;

//-:cnd:noEmit
#if DEBUG
MainWindow.EnableHotReload();
#endif
//+:cnd:noEmit

#if useFrameNav
//-:cnd:noEmit
Host = builder.Build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#endif
//+:cnd:noEmit
#endif
global using Uno.UI;
#if (useCsharpMarkup)
global using Uno.Extensions.Markup;
#if (useMaterial)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@
<ItemGroup>
<!--#if (useCPM)-->
<PackageReference Include="Uno.WinUI.Lottie" />
<PackageReference Include="Uno.WinUI.DevServer" Condition="'$(Configuration)'=='Debug'" />
<!--#else-->
<PackageReference Include="Uno.WinUI.Lottie" Version="$UnoWinUIVersion$" />
<PackageReference Include="Uno.WinUI.DevServer" Version="$UnoWinUIVersion$" Condition="'$(Configuration)'=='Debug'" />
<!--#endif-->

<!-- Include all images by default - matches the __WindowsAppSdkDefaultImageIncludes property in the WindowsAppSDK -->
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Templates/reinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ param(
[string]$ExtensionsVersion = "3.0.0-dev.2335",

# Version of published Uno.WinUI packages
[string]$UnoVersion = "5.0.0-dev.3597"
[string]$UnoVersion = "5.0.13"
)

function RemoveNuGetPackage {
Expand Down
Loading