I have managed to run dotnet-publish on the cli projects but not on a simple command line app that runs fine using dotnet-run.