-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Running migration on published dll #16882
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We've considered it. One hang up I have is that global tools require the .NET Core SDK. I imagine most production environments would only want to install the .NET Core runtime (not the entire SDK) |
Previously discussed in #6313 |
I wonder if we could make a single-file executable to help with this scenario. Doing the equivalent of |
Seems other have solved this https://www.benday.com/2018/07/05/deploy-entity-framework-core-2-1-migrations-from-a-dll In updating the script for SDK 3.1.0.100, I ran it to a weird observation... Givne a If seems that the ef.dll deployed as part of 3.1.0 is actually a netcoreapp2.0 with the dll being deployed Into the package cache as:
In a clean 3.1.0.100 SDK environment this will then not work with the following error:
|
Our experience is that we're connecting to the database from a build server which would be expected to have the SDK. I think that's a common scenario. It's seems to me it's not likely we'd run that on a non-development machine. |
I’d concur and suggest that one is very likely to be running this from ones CI/CD environment that is highly likely to have the full SDK installed... |
An alternative idea to this is Migrations Bundles (issue #19693) |
You can try out one of these suggested solutions on Stackoverflow. |
Note from triage: bundles covers the common scenarios here, and we don't plan to do anything else in this space. |
Currently, we are using something like this to avoid copy the migration files into the production.
but with moving the efcore as a global tools i wonder how this command should look like.
with having the ef as global tool, i tried these and all failed
dotnet ef Company.App.dll database update
dotnet ef database update --assembly Company.App.dll --stratup-assembly Company.App.dll
The text was updated successfully, but these errors were encountered: