microsoft / microsoft/WindowsAppSDK
"Could not copy the file ..." errors after adding Microsoft.WindowsAppSDK.ML NuGet package
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
Describe the bug
I've created a project following these instructions:
https://www.nuget.org/packages/Microsoft.WindowsAppSDK.ML/
If I build the project, it fails with below "Could not copy the file ..." error.
If I change 'Content Include="myIcon.ico"' to 'Content Update="myIcon.ico"' inside Business.csproj the project does build.
Adding a simple NuGet package (Microsoft.WindowsAppSDK.ML) should not mess up my build, and it should not want to copy my files from non-existing places.
Steps to reproduce the bug
- Install VisualStudio 2026 and .net10
- Unzip attached file
- Run this in x64 command prompt (or build with VisualStudio)
msbuild TestWindowsAppSdk.sln /p:Configuration=Debug /p:Platform="Any CPU" /t:build -restore
Error (full output attached):
C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets
(5381,5): error MSB3030: Could not copy the file "C:\codeother\TestWindowsAppSdk2\Business\bin\Debug\net10.0-windows10.
0.17763.0\Business\myIcon.ico" because it was not found. [C:\codeother\TestWindowsAppSdk2\Main\Main.csproj]
Expected behavior
Project should just build when adding Microsoft.WindowsAppSDK.ML NuGet.
Screenshots
No response
NuGet package version
Windows App SDK 1.8.4: 1.8.260101001
Packaging type
Unpackaged
Windows version
Windows 11 version 24H2 LTSC (26100, June Update)
IDE
Other
Additional context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached TestWindowsAppSdk solution, especially Business.csproj and Main.csproj, and reproduce the build using the listed msbuild command. Compare the Content Include entry for myIcon.ico with the Content Update workaround and inspect the package-related build output around Microsoft.Common.CurrentVersion.targets. Done means the unpackaged project builds successfully after adding Microsoft.WindowsAppSDK.ML without manually changing the project entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100