-
Notifications
You must be signed in to change notification settings - Fork 693
Add database migration playground and skip connection string validation for EF tooling #2263
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
d60a5db
to
47ddae3
Compare
playground/DatabaseMigration/DatabaseMigration.MigrationService/ApiDbInitializer.cs
Outdated
Show resolved
Hide resolved
playground/DatabaseMigration/DatabaseMigration.ApiModel/DatabaseMigration.ApiModel.csproj
Show resolved
Hide resolved
47ddae3
to
1a030e1
Compare
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
|
||
<PropertyGroup> | ||
<!-- Clear solution default because EF tooling doesn't like a custom value. --> |
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.
Can you file a bug with EF for this and add a link to it in an XML comment?
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.
It's tracked by dotnet/efcore#23853
This looks like a workable solution to me. Good stuff! |
1a030e1
to
c56dd41
Compare
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>8.0.2</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion> | ||
<MicrosoftExtensionsFeaturesPackageVersion>8.0.2</MicrosoftExtensionsFeaturesPackageVersion> | ||
<MicrosoftEntityFrameworkCoreCosmosPackageVersion>8.0.2</MicrosoftEntityFrameworkCoreCosmosPackageVersion> | ||
<MicrosoftEntityFrameworkCoreDesignPackageVersion>8.0.2</MicrosoftEntityFrameworkCoreDesignPackageVersion> |
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.
Does this need a Version.Details.xml entry?
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.
I don't know. I'm not familiar with when it needs to be updated.
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.
cc @joperezr
<PropertyGroup> | ||
<!-- Clear solution default because EF tooling doesn't like a custom output path. --> | ||
<!-- Issue: https://github.com/dotnet/efcore/issues/23853 --> | ||
<BaseIntermediateOutputPath></BaseIntermediateOutputPath> | ||
</PropertyGroup> |
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.
Can we just do this in a Directory.Build.props
in the playground\DatabaseMigration
folder instead of having this duplicated across all the new projects?
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.
I tried doing that, but it introduced a new problem with the Aspire project not able to find its props/targets.
BaseIntermediateOutputPath change only needs to be done inside the database migration example.
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.
but it introduced a new problem with the Aspire project not able to find its props/targets.
I don't understand what this means. Can you elaborate?
BaseIntermediateOutputPath change only needs to be done inside the database migration example.
Right, that's why I suggest adding it to the playground\DatabaseMigration folder.
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.
Now it works #2327 🤷
Fixes #398
Improves Aspire + EF migrations:
EF.IsDesignTime
is true.Microsoft Reviewers: Open in CodeFlow