I have a project with some nuget packages referenced.
In output folders (bin\\Debug
or bin\\Release
), all referenced libraries lie next to the
Grace to the zivkan's investigation I found the answer. Traditional project has target CopyFilesToOutputDirectory
which depends on _CopyFilesMarkedCopyLocal
target. In this last one we have task Copy
:
And here I found metadata DestinationSubDirectory
which is exactly what I need to change.
First, we need to change csproj file and add these lines:
lib\
Second, we need to change app.config
file to let the assembly know the path to the libraries:
That's all. All referenced libraries will be copied into subfolder lib