microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.36k stars 678 forks source link

Vcpkg dlls not copied into AppX in incremental builds #9795

Open tom-huntington opened 4 months ago

tom-huntington commented 4 months ago

Describe the bug

When I do a rebuild (without touching my .cpp files, i.e. only changing .hlsl on .xaml) I get

To fix this I can

App9\x64\Debug\App9>copy *d.dll AppX\

The problem is the libprotobuf-lited.dll is not in AppX\ but it is in the parent directory.

Steps to reproduce the bug

Install Protobuf https://github.com/protocolbuffers/protobuf/blob/main/src/README.md#c-protobuf---windows

Clone https://github.com/tom-huntington/vcpkg-winui3-build-bug Build. Edit MainWindow.xaml. Rebuilding should reproduce. Copying dlls into AppX\ from parent should fix. Also editing a cpp files and rebuilding should also fix it.

NuGet package version

WinUI 3 - Windows App SDK 1.5.4: 1.5.240607001

HO-COOH commented 4 months ago

I ran into this from time to time. It does not happens 100% of the time, and a clean->rebuild seems to solve this. This is very annoying.

tom-huntington commented 4 months ago

clean->rebuild seems to solve this

I only need to rebuild one compilation unit. But the linking takes to long. It's faster to have a Command Prompt Window open and do the copy manually, then you don't need to rebuild

It does not happens 100% of the time

For me it changes strangely enough. Atm it's 100% of the time

fredstoolbox commented 1 week ago

I have the same issue with the most current build of vcpkg on VS2022. the opencv dll build by vcpkg are in /x64/Release/Project/ folder but NOT in the appX folder where they should be. If I use 'project->clean' before each build then the dlls are copied to the correct location.

Tried both Classic and Manifest mode on vcpkg. having the same issue on both configs.