<p>I am attempting to build a <code>.Net Core 3.0 (preview)</code> project in a DevOps build pipeline.</p>

<p>The steps in my <code>azure-pipelines.yml</code> executes up to the "<code>docker build</code>" step, successfully initiating the build process.
The Docker file is read and executed up to the "dotnet build" step after which the following error is thrown.</p>

<blockquote>
  <p>error MSB3024: Could not copy the file "/src/obj/Release/netcoreapp3.0/" to the destination file "/app/", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles. [/src/.csproj]</p>
</blockquote>

<p>I have attempted to build locally by executing dotnet build ".csproj" -c Release -o /app
The build then succeeds with 0 errors and 0 warnings. Could this be related to an SDK issue in DevOps? </p>

<p>Any advice would be greatly appreciated.</p>

<p>The build command from my Docker file.</p>

<pre><code>RUN dotnet build "&lt;project&gt;.csproj" -c Release -o /app
</code></pre>

<p><br></p>

<pre><code>--- {OMITED}
---1ff83de4bdba
Step 5/16 : WORKDIR /src
---Running in 972629766fad
Removing intermediate container 972629766fad
---1325ecd8e7c3
Step 6/16 : COPY ["&lt;projectname&gt;.csproj", "&lt;projectname&gt;/"]
---a4ba463683dc
Step 7/16 : RUN dotnet restore "&lt;projectname&gt;/&lt;projectname&gt;.csproj"
---Running in 82bb9095d412
Restore completed in 14.08 sec for /src/&lt;projectname&gt;/&lt;projectname&gt;.csproj.
Removing intermediate container 82bb9095d412
---7b0cc236782e
Step 8/16 : COPY . .
---884bb695bfb3
Step 9/16 : WORKDIR /src
---Running in 817b001e2060
Removing intermediate container 817b001e2060
---40b8690ecb63
Step 10/16 : RUN dotnet build "&lt;projectname&gt;.csproj" -c Release -o /app
---Running in 48d79b81c3cb
Microsoft (R) Build Engine version 16.0.462+g62fb89029d for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

Restore completed in 531.02 ms for /src/&lt;projectname&gt;.csproj.
/usr/share/dotnet/sdk/3.0.100-preview5-011568/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(157,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview [/src/&lt;projectname&gt;.csproj]
/usr/share/dotnet/sdk/3.0.100-preview5-011568/Microsoft.Common.CurrentVersion.targets(4560,5): error MSB3024: Could not copy the file "/src/obj/Release/netcoreapp3.0/&lt;projectname&gt;" to the destination file "/app/&lt;projectname&gt;", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles. [/src/&lt;projectname&gt;.csproj]

Build FAILED.

/usr/share/dotnet/sdk/3.0.100-preview5-011568/Microsoft.Common.CurrentVersion.targets(4560,5): **error MSB3024: Could not copy the file "/src/obj/Release/netcoreapp3.0/&lt;projectname&gt;" to the destination file "/app/&lt;projectname&gt;", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles. **[/src/&lt;projectname&gt;.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:11.43
The command '/bin/sh -c dotnet build "&lt;projectname&gt;.csproj" -c Release -o /app' returned a non-zero code: 1
##[error]Bash exited with code '1'.
##[section]Finishing: docker build
</code></pre>

Tinus
<p>In my case the Assembly name of my project was the same as the name of the project and also the same as the directory name of that project. Once I changed the assembly name in the project properties to something else, this error was gone.</p>
