Change output directory of nuget package
Usually, nuget package assemblies and dependencies are copied to OutDir during build, e.g.
bin\Debug\net6.0
. Is it possible to
1. put all the assemblies and dependencies of a specific nuget package in a different folder (e.g. OutDir/sub
) without having to fall back to manually Copy
them in a target.
2. configure that output directory form within the nuget package itself (i.e. via some props or targets)8 Replies
you can change the output directory when doing
dotnet package/build
if thats what you want?If you were to do this, theres no guarantee that the executable will find the assemblies.
@Pobiega I want to change the folder for the consumer of the packages.
@MKP that's not an issue in this case, because this nuget package basically hosts its own runtime in a different process. In the end there are two different processes. One running in OutDir and the other in OutDir/sub
Perhaps you can fudge something by creating another csproj
I'm not sure its possible
change the folder for the consumer of the packages.I'm not sure I follow here. so If I make a program that uses your package, it should change my output directory? O_O?
In any case you can have a post build script do the work
@MKP my colleague suggested the same, but I was hoping to find a different solution.
@Pobiega only of this one nuget package, not the rest of the project
hm, yeah dunno if thats possible
I at least do not know how it would be done