Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3116

PackageReference, how to change the output path of a copied dll?

$
0
0

in myProject.csproj i have references to some nuget packages like so :

<PackageReference Include="MahApps.Metro"><Version>2.0.0</Version><PrivateAssets>all</PrivateAssets><ExcludeAssets></ExcludeAssets><IncludeAssets>compile; build; native; contentfiles; runtime; analyzers</IncludeAssets></PackageReference>

when i build my solution, all the dll is copied to the same directory than my .exe (which is "...blablabla/bin/debug/")

So, i was wondering, how can i change the output folder to hmmm... let's say by example a "...blablabla/bin/debug/lib/" directory just beside my .exe?

at the end, the dll should be in "...blablabla/bin/debug/lib/MahApps.Metro.dll"

EDIT:Oh and in my myProject.exe.config, i have this :

<runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><probing privatePath="lib"/></assemblyBinding></runtime>

So, the myProject.exe is already able to find the dll in the lib directory.

The point, is that i would like to not moving all dlls manually to the lib directory, each time that a dll is rebuilded. (i'm also aware of the solution of removing "runtime;" from IncludeAssets. but it's not the question)

thanks,


Viewing all articles
Browse latest Browse all 3116

Trending Articles