Runtimes Directories Are Being Generated Only in Debug Mode With MSBuild

21 views Asked by At

I' ve created a ProjectA, that is a Nuget package, that uses the follow structure for nuspec, to have the dependencies dlls copied according to the running architecture:

<file src="runtimes\win10-x64\native\mydll.dll" target="runtimes\win10-x64\native\mydll.dll"/>

<file src="runtimes\win10-arm64\native\mydll.dll" target="runtimes\win10-arm64\native\mydll.dll"/>

It's working very well, when I use this nuget in my main ProjectB and generate a build package, because this dll is being generated to output directory according to the architecture, as expected.

But when I try to debug ProjectB with this nuget referenced, the dll is being generated to outputdir\runtimes\win10-arm64\native, intead of being generated only to outputDir (as occur in final package). Why there is this different behavior with debug and final project package? What can I do to avoid coding "IFs" and have allways the outputDir, instead of outputDir\runtimes... or have always outputDir\runtimes...?

0

There are 0 answers