title: Docker run error: “Could not execute because the specified command or file was not found”
body: <p>I am using docker to build and run two services, one a .net core website and the other a .net core processor. I have the website up and running just fine. When I try to run my processor however, I get the following error message:</p>
  
  <blockquote>
    <p>Could not execute because the specified command or file was not found. Possible reasons for this include:</p>
    
    <ul>
    <li><p>You misspelled a built-in dotnet command.</p></li>
    <li><p>You intended to execute a .NET Core program, but dotnet-chores.processor.dll does not exist.</p></li>
    <li><p>You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.</p></li>
    </ul>
  </blockquote>
  
  <ul>
  <li>My website, which is working, has an identical Dockerfile except for the dll name.</li>
  <li>I have run the dotnet build and publish commands manually and they run successfully.</li>
  <li>I have verified that the <code>dotnet publish</code> command generates a dll named "chores.processor.dll" (same capitalization)</li>
  </ul>
  
  <p>My processer dockerfile:</p>
  
  <pre><code>FROM mcr.microsoft.com/dotnet/core/sdk:3.0.100 AS build
  COPY /src /all/src
  
  WORKDIR /all/src
  RUN dotnet build -c Release -o /app
  RUN dotnet publish --no-restore -c Release -o /app
  
  # FROM mcr.microsoft.com/dotnet/core/aspnet:3.0
  WORKDIR /app
  # COPY --from=build /app .
  EXPOSE 80
  ENTRYPOINT ["dotnet", "chores.processor.dll"]
  </code></pre>
  
  <p>Processor csproj:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
      &lt;PropertyGroup&gt;
          &lt;OutputType&gt;Exe&lt;/OutputType&gt;
          &lt;TargetFramework&gt;netcoreapp3.0&lt;/TargetFramework&gt;
          &lt;RootNamespace&gt;Chores.Processor&lt;/RootNamespace&gt;
      &lt;/PropertyGroup&gt;
      &lt;ItemGroup&gt;
          &lt;PackageReference Include="Dapper" Version="2.0.30" /&gt;
          &lt;PackageReference Include="MySqlConnector" Version="0.59.2" /&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Website csproj:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
      &lt;PropertyGroup&gt;
          &lt;TargetFramework&gt;netcoreapp3.0&lt;/TargetFramework&gt;
      &lt;/PropertyGroup&gt;
      &lt;ItemGroup&gt;
          &lt;PackageReference Include="Dapper" Version="2.0.30" /&gt;
          &lt;PackageReference Include="MySqlConnector" Version="0.59.2" /&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>It seems odd to me that the error message appears to be looking for <code>dotnet-chores.processor.dll</code>; why is it prefixed with “dotnet-”?</p>
  
  <p>If anyone has any suggestions on what I can do to further debug this, I would appreciate it.</p>