<p>My question is related to how to use Dockerfile in multiple projects.</p>
<p>when you look at src directory, you will see that all projects structure:</p>
<p>XXXX.Web.csproj under C:\src\test\src\XXXX.Web</p>
<p>Can you give me an advise,please?</p>
<p>my Dockerfile :</p>
<pre><code>FROM mcr.microsoft.com/dotnet/sdk:5.0 as build-image

WORKDIR /.
#COPY [&quot;XXXX.sln&quot;, &quot;./&quot;]
COPY ./*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ &amp;&amp; mv $file ./${file%.*}/; done

RUN dotnet restore

COPY . .



RUN dotnet publish ./XXXX.Web/XXXX.Web.csproj -o /publish/

FROM mcr.microsoft.com/dotnet/aspnet:5.0

WORKDIR /publish

COPY --from=build-image /publish .

ENV ASPNETCORE_URLS=&quot;http://0.0.0.0:80&quot;

ENTRYPOINT [&quot;dotnet&quot;, &quot;XXXX.Web.dll&quot;]
</code></pre>
<p>my .dockerignore:</p>
<pre><code>node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
.env
*/bin
*/obj
README.md 
LICENSE
.vscode

</code></pre>
<p>Please, Tell me what is wrong in my Dockerfile it producing &quot;MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.&quot; Why? I am open for any advise?</p>

Penguen
<p>You have to take care of the location where you execute <code>dotnet restore</code> inside you docker file. You are missing a project or solution location.</p>
<pre><code>dotnet restore &lt;path&gt;/&lt;name&gt;.csproj
</code></pre>
