0

When doing a "dotnet publish" on windows for a freshly downloaded asp.net boilerplate template, everything works fine, and the resulting puplish folder can be used.

However when doing the same on linux, I get the following:

/bin/sh: 2: /tmp/tmpda90e7b4d99846c4936a6816fb7d9654.exec.cmd: robocopy: not found

Is there a specific way I am supposed to do a publish for asp.net boilerplate on linux?

Bertus van Zyl
  • 582
  • 5
  • 17

1 Answers1

0

AspNet Boilerplate merged solution has a PrepublishScript that executing a Robocopy step. Since Linux OS has no Robocopy command, you need to remove the below line in your MyProject.Web.Host.csproj

<Exec Command="robocopy $(MSBuildProjectDirectory)\wwwroot\dist\ $(MSBuildProjectDirectory)\wwwroot\ /S /E /MOVE" IgnoreExitCode="True" />

Click here to go to the related source code line.

And you need to make that step manually; copy the content of the $(MSBuildProjectDirectory)\wwwroot\dist\ to $(MSBuildProjectDirectory)\wwwroot\

PS: MSBuildProjectDirectory is the property that will give you the full path to the project file which was invoked on the command line

Alper Ebicoglu
  • 8,884
  • 1
  • 49
  • 55