1

I am new to vcpkg and currently facing an issue when building a project that requires to be build as x86 & x64. Maybe I am just missing something or haven't understood how it is intended to work: The issue is that building the project fails for x86 after having it build once for x86 followed by x64.

We have the vcpkg.json and the vcpkg-configuration.json in the project root and use this settings in Visual Studio:

enter image description here

The problem can be reproduced as follows: When first building the project from Visual Studio as Win32, vcpkg builds the x86 dependency libraries. The build succeeds. Now the vcpkg installed directory looks like this:

enter image description here

Building the x64 version afterwards also succeeds but deletes the x86-windows folder in the installed directory. Subsequent builds of the x86 version are then failing (deleting the .msbuildstamp-x86-windows.stamp makes it "work" again as the dependencies are then build again).

enter image description here

I wouldn't have expected this behavior, especially not because the .msbuildstamp-x86-windows.stamp is not deleted.

Thanks for your help.

hypetsch
  • 125
  • 1
  • 9

1 Answers1

3

The problem is caused by the position of the <VcpkgEnableManifest>true</VcpkgEnableManifest> inside the .vcproj file. Although Visual Studio (in our case 2022) shows Use Vcpkg Manifest as Yes in the UI, it is not treated as enabled by vcpkg itself. Moving <VcpkgEnableManifest>true</VcpkgEnableManifest> up inside the .vcproj file solves the issue and correctly enabled manifest mode; see VCPKG issue #27106.

hypetsch
  • 125
  • 1
  • 9
  • Hi, glad to know you've found the solution to resolve this issue! Please consider adding an answer and changing its status to Answered. See [can I answer my own question..](https://stackoverflow.com/help/self-answer), Just a reminder :) It will also help others to solve the similar issue. – Jingmiao Xu-MSFT Oct 24 '22 at 01:35