Skip to content

Commit 2cbefb5

Browse files
Update samples to use .net 8 (At least) (#574)
* Fix all from .net6 to .net8 * Fix the build for restore nuget package should be different for vcxproj vs csproj * Convert runtime identifiers * Remove duplicated runtimeidentifiers * Update runtimeidentifiers at *.pubxml * Add a lot of missing runtimeIdentifier changes * Get rid of the condition for runtimeIdentifier * Fix the runtimeIdentifier for OAuthManager doesn't need to add conditional for .net 6 or .net 8
1 parent 1a95de2 commit 2cbefb5

125 files changed

Lines changed: 403 additions & 311 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Samples/AppLifecycle/Activation/cs/cs-console-unpackaged/CsConsoleActivation/CsConsoleActivation.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<Platforms>x64;x86;ARM64</Platforms>
7-
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
7+
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
88
<ApplicationIcon>C.ico</ApplicationIcon>
99
</PropertyGroup>
1010

@@ -20,3 +20,4 @@
2020

2121

2222

23+

Samples/AppLifecycle/Activation/cs/cs-winforms-unpackaged/CsWinFormsActivation/CsWinFormsActivation.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<UseWindowsForms>true</UseWindowsForms>
77
<Platforms>x64;x86;ARM64</Platforms>
8-
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
8+
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
99
<ApplicationIcon>D.ico</ApplicationIcon>
1010
</PropertyGroup>
1111

@@ -31,3 +31,5 @@
3131
</Project>
3232

3333

34+
35+

Samples/AppLifecycle/Activation/cs/cs-wpf-unpackaged/CsWpfActivation/CsWpfActivation.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<UseWPF>true</UseWPF>
77
<Platforms>x64;x86;ARM64</Platforms>
8-
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
8+
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
99
<StartupObject>CsWpfActivation.Program</StartupObject>
1010
<ApplicationIcon>E.ico</ApplicationIcon>
1111
</PropertyGroup>
@@ -22,3 +22,5 @@
2222

2323

2424

25+
26+

Samples/AppLifecycle/Activation/cs1/cs-wpf-packaged/CsWpfActivation/CsWpfActivation.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<UseWPF>true</UseWPF>
77
<Platforms>x64;x86;ARM64</Platforms>
8-
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64;win-x86;win-x64;win-arm64</RuntimeIdentifiers>
8+
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
99
<StartupObject>CsWpfActivation.Program</StartupObject>
1010
</PropertyGroup>
1111

@@ -21,3 +21,5 @@
2121

2222

2323

24+
25+

Samples/AppLifecycle/Activation/cs2/cs-winui-packaged/CsWinUiDesktopActivation/CsWinUiDesktopActivation/CsWinUiDesktopActivation.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
66
<RootNamespace>CsWinUiDesktopActivation</RootNamespace>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<Platforms>x86;x64;ARM64</Platforms>
9-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
9+
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
1010
<UseWinUI>true</UseWinUI>
1111
</PropertyGroup>
1212

@@ -18,3 +18,5 @@
1818

1919

2020

21+
22+
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!--
33
https://go.microsoft.com/fwlink/?LinkID=208121.
44
-->
55
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
66
<PropertyGroup>
77
<PublishProtocol>FileSystem</PublishProtocol>
88
<Platform>arm64</Platform>
9-
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
9+
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
1010
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
1111
<SelfContained>true</SelfContained>
1212
<PublishSingleFile>False</PublishSingleFile>
@@ -16,4 +16,4 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1616
<PublishTrimmed>True</PublishTrimmed>
1717
-->
1818
</PropertyGroup>
19-
</Project>
19+
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!--
33
https://go.microsoft.com/fwlink/?LinkID=208121.
44
-->
55
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
66
<PropertyGroup>
77
<PublishProtocol>FileSystem</PublishProtocol>
88
<Platform>x64</Platform>
9-
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
9+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
1010
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
1111
<SelfContained>true</SelfContained>
1212
<PublishSingleFile>False</PublishSingleFile>
@@ -16,4 +16,4 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1616
<PublishTrimmed>True</PublishTrimmed>
1717
-->
1818
</PropertyGroup>
19-
</Project>
19+
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!--
33
https://go.microsoft.com/fwlink/?LinkID=208121.
44
-->
55
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
66
<PropertyGroup>
77
<PublishProtocol>FileSystem</PublishProtocol>
88
<Platform>x86</Platform>
9-
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
9+
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
1010
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
1111
<SelfContained>true</SelfContained>
1212
<PublishSingleFile>False</PublishSingleFile>
@@ -16,4 +16,4 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1616
<PublishTrimmed>True</PublishTrimmed>
1717
-->
1818
</PropertyGroup>
19-
</Project>
19+
</Project>

Samples/AppLifecycle/EnvironmentVariables/cs-winforms-unpackaged/CsWinFormsEnv/CsWinFormsEnv.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<UseWindowsForms>true</UseWindowsForms>
77
<Platforms>x64;x86;ARM64</Platforms>
8-
<RuntimeIdentifiers>win10-x64;win10-x86</RuntimeIdentifiers>
8+
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
99
<WindowsPackageType>None</WindowsPackageType>
1010
</PropertyGroup>
1111

@@ -16,3 +16,5 @@
1616
</Project>
1717

1818

19+
20+

Samples/AppLifecycle/Instancing/cs/cs-console-unpackaged/CsConsoleInstancing/CsConsoleInstancing.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
66
<Platforms>x64;x86;ARM64</Platforms>
7-
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
7+
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers>
88
<ApplicationIcon>H.ico</ApplicationIcon>
99
</PropertyGroup>
1010

@@ -16,3 +16,5 @@
1616

1717

1818

19+
20+

0 commit comments

Comments
 (0)