Skip to content

Commit

Permalink
chore: Upgrade Counter samples to latest Uno.Sdk 5.6.22 and NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
agneszitte committed Feb 3, 2025
1 parent 1e39f85 commit 6ed84c4
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 40 deletions.
4 changes: 2 additions & 2 deletions reference/Counter/XAML-MVUX/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"server": {
"runtimeExecutable": "dotnet",
"program": "run",
"args": ["--no-build","-f","net8.0-browserwasm","--launch-profile", "Counter (WebAssembly)"],
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "Counter (WebAssembly)"],
"outputCapture": "std",
"timeout": 30000,
"cwd": "${workspaceFolder}/Counter"
Expand All @@ -41,7 +41,7 @@
"request": "launch",
"preLaunchTask": "build-desktop",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Counter/bin/Debug/net8.0-desktop/Counter.dll",
"program": "${workspaceFolder}/Counter/bin/Debug/net9.0-desktop/Counter.dll",
"args": [],
"launchSettingsProfile": "Counter (Desktop)",
"env": {
Expand Down
8 changes: 4 additions & 4 deletions reference/Counter/XAML-MVUX/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-browserwasm",
"/property:TargetFramework=net9.0-browserwasm",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -22,7 +22,7 @@
"publish",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-browserwasm",
"/property:TargetFramework=net9.0-browserwasm",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -35,7 +35,7 @@
"build",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/property:TargetFramework=net9.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -48,7 +48,7 @@
"publish",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/property:TargetFramework=net9.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand Down
2 changes: 1 addition & 1 deletion reference/Counter/XAML-MVUX/Counter/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
{
MainWindow = new Window();
#if DEBUG
MainWindow.EnableHotReload();
MainWindow.UseStudio();
#endif


Expand Down
15 changes: 2 additions & 13 deletions reference/Counter/XAML-MVUX/Counter/Counter.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<Project Sdk="Uno.Sdk">
<PropertyGroup>
<TargetFrameworks>
net8.0-android;
net8.0-ios;
net8.0-maccatalyst;
net8.0-windows10.0.19041;
net8.0-desktop;
net8.0-browserwasm;
</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.26100;net9.0-browserwasm;net9.0-desktop</TargetFrameworks>

<OutputType>Exe</OutputType>
<UnoSingleProject>true</UnoSingleProject>
Expand All @@ -29,11 +22,7 @@
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->

<!-- 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. -->
<!-- Comment this WindowsSdkPackageVersion line again once .NET SDK version 8.0.403 or later is available. -->
<!-- For more details, refer to: https://aka.platform.uno/migrate-from-previous#uno-platform-54 -->
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
<!-- <WindowsSdkPackageVersion>10.0.22621.28</WindowsSdkPackageVersion> -->

<!--
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"Counter (Desktop WSL2)": {
"commandName": "WSL2",
"commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Counter.dll",
"commandLineArgs": "{ProjectDir}/bin/Debug/net9.0-desktop/Counter.dll",
"distributionName": "",
"compatibleTargetFramework": "desktop"
}
Expand Down
1 change: 1 addition & 0 deletions reference/Counter/XAML-MVUX/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
To update the version of Uno, you should instead update the Sdk version in the global.json file.
See https://aka.platform.uno/using-uno-sdk for more information.
See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages.
-->
<ItemGroup>
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion reference/Counter/XAML-MVUX/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
// 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.
"msbuild-sdks": {
"Uno.Sdk": "5.5.32"
"Uno.Sdk": "5.6.22"
},
"sdk": {
"allowPrerelease": false
}
}
4 changes: 2 additions & 2 deletions reference/Counter/XAML-MVVM/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"server": {
"runtimeExecutable": "dotnet",
"program": "run",
"args": ["--no-build","-f","net8.0-browserwasm","--launch-profile", "Counter (WebAssembly)"],
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "Counter (WebAssembly)"],
"outputCapture": "std",
"timeout": 30000,
"cwd": "${workspaceFolder}/Counter"
Expand All @@ -41,7 +41,7 @@
"request": "launch",
"preLaunchTask": "build-desktop",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Counter/bin/Debug/net8.0-desktop/Counter.dll",
"program": "${workspaceFolder}/Counter/bin/Debug/net9.0-desktop/Counter.dll",
"args": [],
"launchSettingsProfile": "Counter (Desktop)",
"env": {
Expand Down
8 changes: 4 additions & 4 deletions reference/Counter/XAML-MVVM/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-browserwasm",
"/property:TargetFramework=net9.0-browserwasm",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -22,7 +22,7 @@
"publish",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-browserwasm",
"/property:TargetFramework=net9.0-browserwasm",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -35,7 +35,7 @@
"build",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/property:TargetFramework=net9.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -48,7 +48,7 @@
"publish",
"${workspaceFolder}/Counter/Counter.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/property:TargetFramework=net9.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand Down
2 changes: 1 addition & 1 deletion reference/Counter/XAML-MVVM/Counter/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
{
MainWindow = new Window();
#if DEBUG
MainWindow.EnableHotReload();
MainWindow.UseStudio();
#endif


Expand Down
11 changes: 2 additions & 9 deletions reference/Counter/XAML-MVVM/Counter/Counter.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<Project Sdk="Uno.Sdk">
<PropertyGroup>
<TargetFrameworks>
net8.0-android;
net8.0-ios;
net8.0-maccatalyst;
net8.0-windows10.0.19041;
net8.0-desktop;
net8.0-browserwasm;
</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.26100;net9.0-browserwasm;net9.0-desktop</TargetFrameworks>

<OutputType>Exe</OutputType>
<UnoSingleProject>true</UnoSingleProject>
Expand All @@ -29,7 +22,7 @@
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
<!-- <WindowsSdkPackageVersion>10.0.22621.28</WindowsSdkPackageVersion> -->

<!--
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"Counter (Desktop WSL2)": {
"commandName": "WSL2",
"commandLineArgs": "{ProjectDir}/bin/Debug/net8.0-desktop/Counter.dll",
"commandLineArgs": "{ProjectDir}/bin/Debug/net9.0-desktop/Counter.dll",
"distributionName": "",
"compatibleTargetFramework": "desktop"
}
Expand Down
1 change: 1 addition & 0 deletions reference/Counter/XAML-MVVM/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
To update the version of Uno, you should instead update the Sdk version in the global.json file.
See https://aka.platform.uno/using-uno-sdk for more information.
See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages.
-->
<ItemGroup>
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion reference/Counter/XAML-MVVM/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
// 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.
"msbuild-sdks": {
"Uno.Sdk": "5.5.32"
"Uno.Sdk": "5.6.22"
},
"sdk": {
"allowPrerelease": false
}
}

0 comments on commit 6ed84c4

Please sign in to comment.