Skip to content

Commit 096762a

Browse files
authored
Merge pull request #865 from unoplatform/dev/vs/update-sdk-simplecalc
Upgrade SimpleCalc sample to latest Uno.Sdk 5.6.30 and .NET9
2 parents b51de84 + 1e2f2a6 commit 096762a

File tree

33 files changed

+66
-95
lines changed

33 files changed

+66
-95
lines changed

reference/Counter/CSharp-MVUX/global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.6.22"
4+
"Uno.Sdk": "5.6.30"
55
},
66
"sdk": {
77
"allowPrerelease": false

reference/SimpleCalc/CSharp-MVUX/.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", "SimpleCalculator (WebAssembly)"],
29+
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "SimpleCalculator (WebAssembly)"],
3030
"outputCapture": "std",
3131
"timeout": 30000,
3232
"cwd": "${workspaceFolder}/SimpleCalculator"
@@ -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}/SimpleCalculator/bin/Debug/net8.0-desktop/SimpleCalculator.dll",
44+
"program": "${workspaceFolder}/SimpleCalculator/bin/Debug/net9.0-desktop/SimpleCalculator.dll",
4545
"args": [],
4646
"launchSettingsProfile": "SimpleCalculator (Desktop)",
4747
"env": {

reference/SimpleCalc/CSharp-MVUX/.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}/SimpleCalculator/SimpleCalculator.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}/SimpleCalculator/SimpleCalculator.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}/SimpleCalculator/SimpleCalculator.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}/SimpleCalculator/SimpleCalculator.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/SimpleCalc/CSharp-MVUX/Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +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.
67
-->
78
<ItemGroup>
89
</ItemGroup>

reference/SimpleCalc/CSharp-MVUX/SimpleCalculator.Tests/SimpleCalculator.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
6+
<IsTestProject>true</IsTestProject>
67
</PropertyGroup>
78

89
<ItemGroup>

reference/SimpleCalc/CSharp-MVUX/SimpleCalculator/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
3030
new Styles.MaterialFontsOverride())));
3131
MainWindow = new Window();
3232
#if DEBUG
33-
MainWindow.EnableHotReload();
33+
MainWindow.UseStudio();
3434
#endif
3535

3636

reference/SimpleCalc/CSharp-MVUX/SimpleCalculator/Properties/launchSettings.json

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

reference/SimpleCalc/CSharp-MVUX/SimpleCalculator/SimpleCalculator.csproj

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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-
net8.0;
11-
</TargetFrameworks>
3+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.26100;net9.0-browserwasm;net9.0-desktop;net9.0</TargetFrameworks>
124

135
<OutputType>Exe</OutputType>
146
<UnoSingleProject>true</UnoSingleProject>
@@ -30,11 +22,7 @@
3022
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
3123
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
3224
-->
33-
34-
<!-- 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. -->
35-
<!-- Comment this WindowsSdkPackageVersion line again once .NET SDK version 8.0.403 or later is available. -->
36-
<!-- For more details, refer to: https://aka.platform.uno/migrate-from-previous#uno-platform-54 -->
37-
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
25+
<!--<WindowsSdkPackageVersion>10.0.22621.28</WindowsSdkPackageVersion>-->
3826

3927
<!--
4028
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
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.30"
5+
},
6+
"sdk": {
7+
"allowPrerelease": false
58
}
69
}

reference/SimpleCalc/CSharp-MVVM/.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", "SimpleCalculator (WebAssembly)"],
29+
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "SimpleCalculator (WebAssembly)"],
3030
"outputCapture": "std",
3131
"timeout": 30000,
3232
"cwd": "${workspaceFolder}/SimpleCalculator"
@@ -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}/SimpleCalculator/bin/Debug/net8.0-desktop/SimpleCalculator.dll",
44+
"program": "${workspaceFolder}/SimpleCalculator/bin/Debug/net9.0-desktop/SimpleCalculator.dll",
4545
"args": [],
4646
"launchSettingsProfile": "SimpleCalculator (Desktop)",
4747
"env": {

0 commit comments

Comments
 (0)