4

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?

Iman Bahrampour
  • 6,180
  • 2
  • 41
  • 64
Maor Veitsman
  • 1,544
  • 9
  • 21
  • Have you looked into Cake (https://cakebuild.net/) ? – Jamie Taylor Nov 24 '17 at 10:11
  • Possible duplicate of [Execute .bat file at end of VS2017 Asp.Net Core publish action?](https://stackoverflow.com/questions/44030112/execute-bat-file-at-end-of-vs2017-asp-net-core-publish-action) – omajid Nov 28 '17 at 18:44

0 Answers0