Open FrayxRulez opened 6 days ago
@BillyONeal Can you help take a look at this issue?
As far as I know .csproj was never intended to be used with this, and not engaging vcpkg's customizations for .csproj was, in fact, the whole purpose of that change. People were complaining that projects unrelated to C++ were slowed down by our attempt to deploy applocal DLLs.
Can you describe what you were actually trying to do here?
I just have a C# project referencing a few C++ projects (C++/WinRT) that happen to use VCPKG, so I’d expect these vcpkg dependencies to be transitive. As I build the C# project, all the C++ binaries get copied by MSBuild to the output folder as they’re needed by the final executable to run, if all the VCPKG ones are then missing the thing is just going to crash on launch.
I don't think restoring running applocal.ps1 in .csproj is correct here; adding an explicit way to ask for it might make sense.
Actually, I go back to being confused at what this would have ever done:
$(TargetPath)
will be pointing at your C# code in .csproj
world, if it exists at all.
The script worked as I would (personally) expect before your change, and it still works today by removing the check on @(Link)
.
I still feel that's quite reasonable for dependencies to be transitive: if I have a reference chain such as A.vcxproj -> B.vcxproj -> C.csproj, in the final bin directory I'll find A.dll, B.dll and C.dll, why the same behavior shouldn't exist if the dependency comes in the form of a vcpkg package rather than any other way? (NuGet packages are transitive as well, same applies for VSIX extensions and so on).
So, I'm not really arguing on whether or not this should be done, I'm more interested in getting the "old" behavior restored.
Starting from this commit vcpkg fails to deploy dependencies to my MSBuild solution where the entry point is a C# project referencing multiple C++ ones.
This seems to be caused by the addition of
and '@(Link)' != ''
toAppLocalFromInstalled
conditions, removing the check seems to restore the old behavior where DLLs get successfully copied to both vcxproj and csproj output folders.I use classic vcpkg without any manifest.