-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[rc2] Fix dotnet-ef migrations bundle command on Linux #36750
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
…ompatibility Co-authored-by: AndriySvyryd <[email protected]>
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 As verification, create a simple temporary EF project, then use dotnet exec
on the ef.dll
with the fix to add a migration for the simple project and then to create a bundle for it. Then execute the bundle. Don't commit any of this.
Rewrite the PR summary using this template:
Fixes #{number}
**Description**
{Issue description}
**Customer impact**
{How does the reported issue affects customer's app? Are there workarounds?}
**How found**
{Was it customer reported or found during verification? How many customers are affected?}
**Regression**
{Is it a regression from a released version? Which one?}
**Testing**
{How the changes were tested}
**Risk**
{Low/Medium/High, argument why}
@AndriySvyryd - Path canonicalization is a tough subject. I'm surprised the fix looks this simple. Have we checked at all with our experts like David C or Jeremy K? This seems like something the Path object should have just taken care of for you. |
This is a very localized fix, there might be other cases regressed by #34574 that are still not fixed. I haven't dug into why @jkoritzinsky @JeremyKuhne @jozkee As I understand |
@AndriySvyryd |
If you need to combine segments you should use MSBuild doesn't really handle paths that have back slashes If you must persist a path between OSes, the best choice is to use |
Thanks for the tips @JeremyKuhne
Since that's not directly related to the reported issue filed #36754 to avoid introducing extra changes in this PR.
Unfortunately, we are quite limited in what we can get from MSBuild, we get the property value using
|
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.
RC2. Thank you for the dilligence!
Fixes #36142
Description
The
dotnet ef migrations bundle
command was failing on Linux because the path construction logic didn't properly normalize directory separators.MSBuild
returnedOutputPath
containing backslashes (e.g.,bin\Debug/net10.0
) which, when combined with forward-slash project paths on Linux, resulted in mixed separator paths like/home/user/project/bin\Debug/net10.0/App.deps.json
, causing thedotnet exec
command to fail with "The specified deps.json [path] does not exist".Customer impact
Customers using EF Core tools on Linux could not create migration bundles using
dotnet ef
. The workaround would be to call into the underlyingef.dll
manually with the correct path, but this is a poor experience.How found
7 customer reports
Regression
Yes, from EF 9. Introduced in #34574
Testing
Manually verified by creating a test EF project and successfully executing
dotnet-ef migrations bundle
on LinuxRisk
Low. The change is a simple path normalization.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.