-
-
Notifications
You must be signed in to change notification settings - Fork 2
Fix Docker build: resolve NU1510 warnings and missing dotnet-ef tool #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: sphildreth <193334+sphildreth@users.noreply.github.com>
…ation Co-authored-by: sphildreth <193334+sphildreth@users.noreply.github.com>
| <PackageReference Include="Blazored.SessionStorage" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" /> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.Design" /> | ||
| <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Is this going to break the build? Ensure all projects in solution build. Do a "dotnet clean" then "dotne build". Ensure all unit tests pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified - the changes do not break the build. All validation complete:
✅ dotnet clean - successful
✅ dotnet build - 0 warnings, 0 errors (all 6 projects built successfully)
✅ dotnet test - 3016 passed, 1 skipped, 0 failed
✅ dotnet restore - 0 warnings (NU1510 warnings eliminated)
The removed package references are indeed redundant - they're already provided by the ASP.NET Core 10 shared framework and are properly resolved transitively.
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this 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 resolves Docker container crash-looping issues by fixing missing dotnet-ef tool installation and eliminating redundant package reference warnings. The changes ensure the container can successfully execute EF Core migrations and start the application without errors.
Key Changes:
- Removed 6 redundant Microsoft.Extensions.* package references that are already included in ASP.NET Core 10 shared framework, eliminating NU1510 warnings
- Fixed dotnet-ef tool installation by moving it after user creation and adding explicit version pinning (10.0.1) to match EF Core dependencies
- Added Directory.Build.props to Docker image to support MSBuild properties required during migrations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Melodee.Blazor/Melodee.Blazor.csproj | Removed 6 redundant Microsoft.Extensions package references that caused NU1510 warnings |
| Dockerfile | Fixed dotnet-ef tool installation timing and version, added Directory.Build.props copying to both build and final stages |
The changes are well-structured and properly address both reported issues. The removal of redundant package references is correct since ASP.NET Core 10 already includes these packages in the shared framework. The dotnet-ef tool installation fix properly sequences the installation after user creation and pins to the correct version matching the EF Core dependencies.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Docker container was crash-looping due to missing
dotnet-eftool during migrations. Build also generated 6 NU1510 warnings for redundant package references.Changes
Removed redundant package references from Melodee.Blazor.csproj
Fixed dotnet-ef tool installation in Dockerfile
--version 10.0.1matching EF Core dependenciesAdded Directory.Build.props to Docker image
AllowMissingPrunePackageDataMSBuild property during migrationsVerification
Container should now start successfully and execute migrations without the "dotnet-ef does not exist" error.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
http://s.symcb.com:443/universal-root.crl/usr/bin/dotnet dotnet restore --verbosity detailed(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.