1

I have C++ source in source-control that uses vcpkg through project-wide integration (the .props and .targets files from vcpkg are imported).

That works great, but a developer in the team already has vcpkg installed on their system a different folder. They used `vcpkg integrate install' to use it with Visual Studio projects.

That results in many build warnings for them that look like this:

C:\Users\<username>\AppData\Local\vcpkg\vcpkg.user.props(3,3): warning MSB4011: "D:\vcpkg\scripts\buildsystems\msbuild\vcpkg.props" cannot be imported again. It was already imported at "D:\MyApp\Directory.Build.props". This is most likely a build authoring error. This subsequent import will be ignored.

I thought a Condition on the import might work, but I think the condition <Import Condition="'$(VcpkgPropsImported)'!='true'" would need to be on the Import in vcpkg.user.props created by the vcpkg integrate install. And that is outside my app's source code, so a future vcpkg integrate install would break again.

Is there a work-around that can be used?

Scott Langham
  • 58,735
  • 39
  • 131
  • 204

0 Answers0