Microsoft.Packaging.Tools.Trimming icon indicating copy to clipboard operation
Microsoft.Packaging.Tools.Trimming copied to clipboard

Documentation says task removes files from deps.json, but it doesn't

Open wjk opened this issue 6 years ago • 2 comments

What the title says, really. Without this feature, trimming a self-contained .NET Core project results in a project that won't run. As far as I can tell, this feature isn't actually implemented anywhere. Could this please be fixed? Thanks!

wjk avatar Aug 07 '19 00:08 wjk

The targets do this by setting the _ConflictPackageFiles item which the SDK should honor when generating the deps file. Can you share a repro that's not running along with the SDK version and I'll take a closer look.

ericstj avatar Nov 07 '19 22:11 ericstj

@ericstj I think I've found the problem. This error only occurs when the project being trimmed is ran through a Desktop Bridge project (*.wapproj). Apparently the Desktop Bridge targets cause the deps.json file to be overwritten with a pristine copy that references the trimmed files. When I build and run the project directly from its OutputPath, it works just fine. Unfortunately, due to the complexity and general opaqueness of the UWP/Desktop Bridge build process, I cannot debug this issue any further. Could you look into this for me? Thanks!

wjk avatar Nov 23 '19 22:11 wjk