WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

I'm getting multiple files output in builds

Open Gavin-Williams opened this issue 1 year ago • 0 comments

Describe the bug

I don't know if this is a new or old issue. But as of a few days ago, my files aren't being updated during build. Or at least one of the output files are not updated. And that gets to the problem. Build is outputting files twice, each with a different path...

https://github.com/dotnet/msbuild/discussions/9750

I installed project system tools and recorded a build. Going down through it I found...

Target GetCopyToOutputDirectoryItemsOutputGroup Add GetCopyToOutputDirectoryItemsOutputGroupOutput

And a whole heap of items, including the example .png I mention here are listed twice with the two paths.

So what? I don't know. This just tells me that it's doing what I thought it was doing. It says the source file is:

C:\Users\deads.nuget\packages\microsoft.windowsappsdk\1.4.231219000\buildTransitive\MrtCore.PriGen.targets

And the parent is

GetMrtPackagingOutputs

You can see why I've posted an issue here, it looks like WindowsAppSDK is leading build to produce these duplicate outputs. This needs to be resolved, because it can lead to a situation where only one of the branches respects Copy-if-newer. Obviously that's a problem because build and run doesn't work then.

Steps to reproduce the bug

I'm working on it.

Expected behavior

I expect only 1 copy of files in the output directory. Not sure which path is correct though. It can include the library project name or not. Probably the project name in the path is more correct, because these assets will be copied into another project. So they should clearly belong to the library.

Screenshots

No response

NuGet package version

Windows App SDK 1.4.5: 1.4.240211001

Packaging type

Unpackaged

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022

Additional context

No response

Gavin-Williams avatar Feb 16 '24 18:02 Gavin-Williams