Skip to content

Commit b51de84

Browse files
authored
Merge pull request #864 from unoplatform/dev/vs/update-sdk-commerce
Upgrade Commerce sample to latest Uno.Sdk 5.6.22 and NET 9
2 parents bb92ac4 + 597e7e0 commit b51de84

File tree

10 files changed

+23
-27
lines changed

10 files changed

+23
-27
lines changed

reference/Commerce/src/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"server": {
2727
"runtimeExecutable": "dotnet",
2828
"program": "run",
29-
"args": ["--no-build","-f","net8.0-browserwasm","--launch-profile", "Commerce (WebAssembly)"],
29+
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "Commerce (WebAssembly)"],
3030
"outputCapture": "std",
3131
"timeout": 30000,
3232
"cwd": "${workspaceFolder}/Commerce"
@@ -41,7 +41,7 @@
4141
"request": "launch",
4242
"preLaunchTask": "build-desktop",
4343
// If you have changed target frameworks, make sure to update the program path.
44-
"program": "${workspaceFolder}/Commerce/bin/Debug/net8.0-desktop/Commerce.dll",
44+
"program": "${workspaceFolder}/Commerce/bin/Debug/net9.0-desktop/Commerce.dll",
4545
"args": [],
4646
"launchSettingsProfile": "Commerce (Desktop)",
4747
"env": {

reference/Commerce/src/.vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build",
1010
"${workspaceFolder}/Commerce/Commerce.csproj",
1111
"/property:GenerateFullPaths=true",
12-
"/property:TargetFramework=net8.0-browserwasm",
12+
"/property:TargetFramework=net9.0-browserwasm",
1313
"/consoleloggerparameters:NoSummary"
1414
],
1515
"problemMatcher": "$msCompile"
@@ -22,7 +22,7 @@
2222
"publish",
2323
"${workspaceFolder}/Commerce/Commerce.csproj",
2424
"/property:GenerateFullPaths=true",
25-
"/property:TargetFramework=net8.0-browserwasm",
25+
"/property:TargetFramework=net9.0-browserwasm",
2626
"/consoleloggerparameters:NoSummary"
2727
],
2828
"problemMatcher": "$msCompile"
@@ -35,7 +35,7 @@
3535
"build",
3636
"${workspaceFolder}/Commerce/Commerce.csproj",
3737
"/property:GenerateFullPaths=true",
38-
"/property:TargetFramework=net8.0-desktop",
38+
"/property:TargetFramework=net9.0-desktop",
3939
"/consoleloggerparameters:NoSummary"
4040
],
4141
"problemMatcher": "$msCompile"
@@ -48,7 +48,7 @@
4848
"publish",
4949
"${workspaceFolder}/Commerce/Commerce.csproj",
5050
"/property:GenerateFullPaths=true",
51-
"/property:TargetFramework=net8.0-desktop",
51+
"/property:TargetFramework=net9.0-desktop",
5252
"/consoleloggerparameters:NoSummary"
5353
],
5454
"problemMatcher": "$msCompile"

reference/Commerce/src/Commerce/App.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
</ResourceDictionary.MergedDictionaries>
3030

3131
<x:Double x:Key="LandscapeMaxPageWidth">500</x:Double>
32+
<x:Double x:Key="WideMinWindowWidth">800</x:Double>
3233

3334
</ResourceDictionary>
3435
</Application.Resources>

reference/Commerce/src/Commerce/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args)
9797
MainWindow = builder.Window;
9898

9999
#if DEBUG
100-
MainWindow.EnableHotReload();
100+
MainWindow.UseStudio();
101101
#endif
102102
MainWindow.SetWindowIcon();
103103

reference/Commerce/src/Commerce/Commerce.csproj

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
<Project Sdk="Uno.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>
4-
net8.0-android;
5-
net8.0-ios;
6-
net8.0-maccatalyst;
7-
net8.0-windows10.0.19041;
8-
net8.0-desktop;
9-
net8.0-browserwasm;
10-
</TargetFrameworks>
3+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.26100;net9.0-browserwasm;net9.0-desktop</TargetFrameworks>
114

125
<OutputType>Exe</OutputType>
136
<UnoSingleProject>true</UnoSingleProject>
@@ -29,11 +22,7 @@
2922
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
3023
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
3124
-->
32-
33-
<!-- Uno Platform 5.4 has been updated to use WinAppSDK 1.6, which necessitates a temporary version adjustment until newer versions of .NET 8 SDKs are released. -->
34-
<!-- Comment this WindowsSdkPackageVersion line again once .NET SDK version 8.0.403 or later is available. -->
35-
<!-- For more details, refer to: https://aka.platform.uno/migrate-from-previous#uno-platform-54 -->
36-
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
25+
<!--<WindowsSdkPackageVersion>10.0.22621.28</WindowsSdkPackageVersion>-->
3726

3827
<!--
3928
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
@@ -55,6 +44,7 @@
5544
ExtensionsCore;
5645
</UnoFeatures>
5746
</PropertyGroup>
47+
5848
<ItemGroup>
5949
<None Remove="products.json" />
6050
<Content Include="products.json" />

reference/Commerce/src/Commerce/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"Commerce (Desktop WSL2)": {
4444
"commandName": "WSL2",
45-
"commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Commerce.dll",
45+
"commandLineArgs": "{ProjectDir}/bin/Debug/net9.0-desktop/Commerce.dll",
4646
"distributionName": "",
4747
"compatibleTargetFramework": "desktop"
4848
}

reference/Commerce/src/Commerce/Views/DealsPage.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<VisualState x:Name="Narrow" />
9292
<VisualState x:Name="Wide">
9393
<VisualState.StateTriggers>
94-
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidthh}" />
94+
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidth}" />
9595
</VisualState.StateTriggers>
9696
<VisualState.Setters>
9797
<Setter Target="DealsColumn.Width" Value="*" />
@@ -154,7 +154,7 @@
154154
<VisualStateGroup>
155155
<VisualState x:Name="Wide">
156156
<VisualState.StateTriggers>
157-
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidthh}" />
157+
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidth}" />
158158
</VisualState.StateTriggers>
159159
<VisualState.Setters>
160160
<Setter Target="DealsListView.SelectionMode" Value="Single" />
@@ -206,7 +206,7 @@
206206
<VisualStateGroup>
207207
<VisualState x:Name="Wide">
208208
<VisualState.StateTriggers>
209-
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidthh}" />
209+
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidth}" />
210210
</VisualState.StateTriggers>
211211
<VisualState.Setters>
212212
<Setter Target="DealsListView.SelectionMode" Value="Single" />

reference/Commerce/src/Commerce/Views/ProductsPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<VisualState x:Name="Narrow" />
2929
<VisualState x:Name="Wide">
3030
<VisualState.StateTriggers>
31-
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidthh}" />
31+
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidth}" />
3232
</VisualState.StateTriggers>
3333
<VisualState.Setters>
3434
<Setter Target="ProductsColumn.Width" Value="*" />
@@ -82,7 +82,7 @@
8282
<VisualStateGroup>
8383
<VisualState x:Name="Wide">
8484
<VisualState.StateTriggers>
85-
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidthh}" />
85+
<AdaptiveTrigger MinWindowWidth="{StaticResource WideMinWindowWidth}" />
8686
</VisualState.StateTriggers>
8787
<VisualState.Setters>
8888
<Setter Target="ProductsListView.SelectionMode" Value="Single" />

reference/Commerce/src/Directory.Packages.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
To update the version of Uno, you should instead update the Sdk version in the global.json file.
44
55
See https://aka.platform.uno/using-uno-sdk for more information.
6+
See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages.
7+
68
-->
79
</Project>

reference/Commerce/src/global.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
// To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
33
"msbuild-sdks": {
4-
"Uno.Sdk": "5.5.32"
4+
"Uno.Sdk": "5.6.22"
5+
},
6+
"sdk": {
7+
"allowPrerelease": false
58
}
69
}

0 commit comments

Comments
 (0)