No executable found matching command "dotnet-/app/Build\ClearPluginAssemblies.dll" Docker No executable found matching command "dotnet-/app/Build\ClearPluginAssemblies.dll" Docker docker docker

No executable found matching command "dotnet-/app/Build\ClearPluginAssemblies.dll" Docker


This looks more like a dotnet publish issue then an actually issue with docker.

If you search on the actual error that dotnet cli shows MSB3073, you can find that it's often related to post build events.In many cases, the path to each folder/assembly referenced in the post build event is not correct.

If we look closer at where we are when the publish command is executed

WORKDIR /app/Presentation/MyProject.Web

And then for example look at the PluginPath in the error message

..PluginPath=/app/Presentation/MyProject.Web/Plugins/DiscountRules.CustomerRoles/;..

You can then see that the path is not inline from where the command is executed.

One solutions would be to add absolute path or make them relative from where the publish command is executed. You could also specify a specific post/pre-events for each configuration, here's an answer regarding publish-events