WindowsAppSDK-Samples icon indicating copy to clipboard operation
WindowsAppSDK-Samples copied to clipboard

[WinML] NU1102 errors observed with C# samples

Open adrastogi opened this issue 5 months ago • 1 comments

Steps

  1. Clone the repository and attempt to build the Windows ML C# sample applications (there might be a step needed in the Package Sources UI to enable the associated NuGet feed).

Expected Applications build without issue

Actual At least on one of the devices that I tested on, the applications generate NuGet errors with specific versions of dependencies that are pulled in presumably from the Microsoft.Net.Sdk project element. I didn't see this on an earlier machine. I don't yet know how the system is determining what version of the packages to acquire and whether there is a fix we need in the .csproj or if the solution is to upload more packages to the feed.

ResnetBuildDemoCS.csproj Errors Unable to find package Microsoft.AspNetCore.App.Runtime.win-x86 with version (= 8.0.17)

  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.NETCore.App.Runtime.win-x86 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.NETCore.App.Runtime.win-arm64 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.AspNetCore.App.Runtime.win-x64 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-arm64 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x64 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.AspNetCore.App.Runtime.win-arm64 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.NETCore.App.Runtime.win-x64 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x86 with version (= 8.0.17)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ]

CSharpConsole.csproj Errors Unable to find package Microsoft.NETCore.App.Runtime.win-x86 with version (= 9.0.6)

  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.AspNetCore.App.Runtime.win-x86 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.NETCore.App.Runtime.win-arm64 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.AspNetCore.App.Runtime.win-x64 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-arm64 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x64 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.AspNetCore.App.Runtime.win-arm64 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.NETCore.App.Runtime.win-x64 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ] Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x86 with version (= 9.0.6)
  • Found 6 version(s) in WinAppSDK-SampleDeps [ Nearest version: 9.0.4 ]

adrastogi avatar Jul 09 '25 04:07 adrastogi

The fix for this is to add the public nuget.org feed via the Nuget Package Manager UI in Visual Studio (https://api.nuget.org/v3/index.json). The WinAppSDK-SampleDeps feed does not cover all of the various monthly .NET updates, but those can be obtained from nuget.org.

adrastogi avatar Jul 31 '25 00:07 adrastogi