Skip to content

"Could not copy the file ..." error when using #6174

@debruyckere

Description

@debruyckere

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

  1. Install VisualStudio 2026 and .net10
  2. Unzip attached file
  3. 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]

TestWindowsAppSdk2.zip

msbuild-output.txt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-DeveloperToolsIssues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integrationneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions