microsoft / microsoft/WindowsAppSDK-Samples

Samples use unsupported RuntimeIdentifiers (RIDs) - `win10-*`

Open
#548 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
335
Avg merge
5d 1h
Merged PRs (30d)
8

Description

As per the .NET SDK uses a smaller RID graph documentation the "RID graph" has been pruned. Only 'portable' RIDs should be used (e.g. win-, linux-), and version-specific RIDs should not be used (i.e. win10-). There are still several samples using the pruned RIDs:

> findstr /spin /c:"RuntimeIdentifiers>win10" *.csproj
Samples\AppLifecycle\Activation\cs\cs-console-unpackaged\CsConsoleActivation\CsConsoleActivation.csproj:7:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Activation\cs\cs-winforms-unpackaged\CsWinFormsActivation\CsWinFormsActivation.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Activation\cs\cs-wpf-unpackaged\CsWpfActivation\CsWpfActivation.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Activation\cs1\cs-wpf-packaged\CsWpfActivation\CsWpfActivation.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64;win-x86;win-x64;win-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Activation\cs2\cs-winui-packaged\CsWinUiDesktopActivation\CsWinUiDesktopActivation\CsWinUiDesktopActivation.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\EnvironmentVariables\cs-winforms-unpackaged\CsWinFormsEnv\CsWinFormsEnv.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86</RuntimeIdentifiers>
Samples\AppLifecycle\Instancing\cs\cs-console-unpackaged\CsConsoleInstancing\CsConsoleInstancing.csproj:7:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Instancing\cs\cs-winforms-unpackaged\CsWinFormsInstancing\CsWinFormsInstancing.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Instancing\cs\cs-wpf-unpackaged\CsWpfInstancing\CsWpfInstancing.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Instancing\cs1\cs-wpf-packaged\CsWpfInstancing\CsWpfInstancing.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64;win-x86;win-x64;win-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Instancing\cs2\cs-winui-packaged\CsWinUiDesktopInstancing\CsWinUiDesktopInstancing\CsWinUiDesktopInstancing.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\Restart\cs-winui-packaged\cs-winui-packaged\cs-winui-packaged.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\RestartRegistration\cs-winui-packaged\cs-winui-packaged.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\ShareTarget\WinUI-CS-ShareTargetSampleApp\WinUI-CS-ShareTargetSampleApp\WinUI-CS-ShareTargetSampleApp.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\StateNotifications\cs\cs-console-unpackaged\CsConsoleState\CsConsoleState.csproj:7:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\StateNotifications\cs\cs-winforms-unpackaged\CsWinFormsState\CsWinFormsState.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\StateNotifications\cs\cs-wpf-unpackaged\CsWpfState\CsWpfState.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\StateNotifications\cs1\cs-wpf-packaged\CsWpfState\CsWpfState.csproj:8:    <RuntimeIdentifiers>win10-x64;win10-x86;win10-arm64;win-x86;win-x64;win-arm64</RuntimeIdentifiers>
Samples\AppLifecycle\StateNotifications\cs2\cs-winui-packaged\CsWinUiDesktopState\CsWinUiDesktopState\CsWinUiDesktopState.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\CustomControls\CsApp\CsApp.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\CustomControls\WinUIComponentCs\WinUIComponentCs.csproj:6:              <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\DeploymentManager\cs-winui\DeploymentManagerSample.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\Notifications\App\CsUnpackagedAppNotifications\CsUnpackagedAppNotifications\CsUnpackagedAppNotifications.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\PhotoEditor\cs-winui\PhotoEditor.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\ResourceManagement\cs\cs-winforms-unpackaged\winforms_unpackaged_app.csproj:10:    <RuntimeIdentifiers>win10-x86;win10-x64</RuntimeIdentifiers>
Samples\ResourceManagement\cs\cs-winui\ClassLibrary\ClassLibrary.csproj:7:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\ResourceManagement\cs\cs-winui\winui_desktop_packaged_app\winui_desktop_packaged_app.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\SelfContainedDeployment\cs\cs-wpf-unpackaged\SelfContainedDeployment.csproj:8:  <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\SelfContainedDeployment\cs1\cs-winui-packaged-wap\SelfContainedDeployment\SelfContainedDeployment.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\SelfContainedDeployment\cs2\cs-winui-packaged\SelfContainedDeployment.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\SelfContainedDeployment\cs2\cs-winui-unpackaged\SelfContainedDeployment.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\Unpackaged\cs-console-unpackaged\Unpackaged.csproj:7:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\Widgets\cs-console-packaged\CsConsoleWidgetProvider\CsConsoleWidgetProvider.csproj:8:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\Windowing\cs\cs-winforms-unpackaged\winforms_unpackaged_app.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Samples\Windowing\cs\cs-winui\Windowing.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
Templates\VSIX\Project Templates\cs-winui-template\WinUI3TemplateCs.csproj:9:    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>

Using a modern dotnet SDK yields build errors when attempting to build them:

"S:\source\github\microsoft\WindowsAppSDK-Samples\samples\Input\cs-winui\Input.sln" (default target) (1) ->
"S:\source\github\microsoft\WindowsAppSDK-Samples\samples\Input\cs-winui\Input.csproj" (default target) (2) ->
(ProcessFrameworkReferences target) ->
  C:\Program Files\dotnet\sdk\9.0.305\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1083: The specified RuntimeIdentifier 'win1
0-x64' is not recognized. See https://aka.ms/netsdk1083 for more information. [S:\source\github\microsoft\WindowsAppSDK-Samples\samples\Input\cs-winui\Input.csproj]
  C:\Program Files\dotnet\sdk\9.0.305\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1083: The specified RuntimeIdentifier 'win1
0-x86' is not recognized. See https://aka.ms/netsdk1083 for more information. [S:\source\github\microsoft\WindowsAppSDK-Samples\samples\Input\cs-winui\Input.csproj]
  C:\Program Files\dotnet\sdk\9.0.305\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1083: The specified RuntimeIdentifier 'win1
0-arm64' is not recognized. See https://aka.ms/netsdk1083 for more information. [S:\source\github\microsoft\WindowsAppSDK-Samples\samples\Input\cs-winui\Input.csproj]

Switching win10-* RIDs to win-* RIDs seems like reasonable due dilligence.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed Samples/**/.csproj and Templates/VSIX/Project Templates/cs-winui-template/WinUI3TemplateCs.csproj files, using the provided findstr search to locate every win10- RuntimeIdentifier. Replace the pruned identifiers with the corresponding portable win-* values, then build an affected sample with a modern .NET SDK and confirm the NETSDK1083 errors are gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.