Skip to content

Fix Dockerfile build by including Directory.Packages.props#50

Merged
PhantomDave merged 2 commits intomainfrom
copilot/fix-dockerfile-build-issue
Nov 14, 2025
Merged

Fix Dockerfile build by including Directory.Packages.props#50
PhantomDave merged 2 commits intomainfrom
copilot/fix-dockerfile-build-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 14, 2025

The Dockerfile build was failing because Directory.Packages.props wasn't copied before dotnet restore. The project uses Central Package Management, which requires this file to resolve package versions.

Changes

  • Added COPY ["Directory.Packages.props", "./"] before copying .csproj files in the Dockerfile

This ensures NuGet can locate centrally-managed package versions during the restore phase, eliminating version resolution errors like:

error CS1705: Assembly 'Microsoft.EntityFrameworkCore.Relational' with identity 'Version=1.0.1.0' 
uses 'Microsoft.EntityFrameworkCore, Version=1.0.1.0' which has a higher version than 
referenced assembly 'Microsoft.EntityFrameworkCore' with identity 'Version=1.0.0.0'
Original prompt

Seems like we broke the dockerfile build, did we miss to add the .props file?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: PhantomDave <34485699+PhantomDave@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Dockerfile build by adding .props file Fix Dockerfile build by including Directory.Packages.props Nov 14, 2025
Copilot AI requested a review from PhantomDave November 14, 2025 22:05
@PhantomDave PhantomDave marked this pull request as ready for review November 14, 2025 22:05
Copilot AI review requested due to automatic review settings November 14, 2025 22:05
@PhantomDave PhantomDave merged commit 1132e06 into main Nov 14, 2025
6 of 9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the Dockerfile build failure caused by missing Central Package Management configuration. The project uses Directory.Packages.props to centrally manage NuGet package versions, which must be present during the restore phase.

  • Added Directory.Packages.props copy statement before copying .csproj files to ensure NuGet can resolve centrally-managed package versions during dotnet restore

@PhantomDave PhantomDave deleted the copilot/fix-dockerfile-build-issue branch November 15, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants