Let's say I have some NuGet package that contains c++ dll and interop for this dll. When I install this package, I see that my scproj file gets updated with the following reference:
<Reference Include="Interop.MyCppAssembly, Version=1.1.1.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MyNuGetPackage.1.1.1.1\lib\Interop.MyCppAssembly.dll</HintPath>
<Private>False</Private>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
You can see that HintPath points to the folder where my packages are installed. You can also see that I set Copy Local to false so Interop.MyCppAssembly.dll won't be copied to my output directory (let's call it bin) during the build. I did it intentionally, because I don't want to put any third party dlls into my bin folder to avoid mess in my output directory. Instead, I would like to create a subfolder in my bin like bin\ThirdPartyLibs and put all third party dlls there.
But how can I do this? I know I can set CopyLocal to true, and then use Post Build Event to move Interop.MyCppAssembly.dll from bin to bin\ThirdPartyLibs but I don't like this. Is there any other solution how to copy dll to the subfolder of the output directory during the build?