I'm publishing a .net core
web API app in a macOS and Ubuntu environments. Other than the .net packages which are published smoothly in both cases I'm also trying to publish a custom dynamic library. The library is defined as Copy Always
and it is indeed copied to the output folder as needed. But before copying it I would like to recompile it by running a custom make
command using a pre-existing Makefile
. The Makefile
is generic and works in both environments, creating a 'shared library' in Ubuntu and a 'dylib' file in macOS.
I edited the pre-build custom commands in visual studio and I'm able to recompile the library with every build but I can't replicate this behavior to the dotnet publish
command. Is there any way to add custom commands to the dotnet publish
process?