-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fix for 8332. Pass in arguments to IDesignTimeDbContextFactory #20341
Conversation
Incorrect issue linked? |
@smitpatel Fixed. |
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.
Did you manually verify that this works? You can install a local build of dotnet-ef using the following command:
build -pack
dotnet tool install -g dotnet-ef --version 5.0.0-* --add-source C:\path\to\efcore\artifacts\packages\Debug\Shipping
Things to test: (manually is fine)
- Does it work with short and long options unknown to ef? (e.g.
-u
and--unknown
)- If not, do they work with
--
? (e.g.dotnet ef dbcontext info -- --unknown
)
- If not, do they work with
- Are arguments passed into Program.BuildWebHost/CreateWebHostBuilder/CreateHostBuilder?
- Are the arguments passed into IDesignTimeDbContextFactory.Create?
Just note to myself: to install the tool for test you need to run:
|
@bricelam I've determined that though the above is installing the |
@bricelam Never mind. I cleared my NuGet caches and a warning message showed up saying it was picking up an old version. If I then added the path from |
f7216b3
to
2823e3b
Compare
@bricelam I've now manually verified that this works. If you pass the |
@bricelam Also added the Powershell updates after testing those too. |
87afef9
to
4b6a18e
Compare
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.
Just a few minor comments
4b6a18e
to
0f03c5f
Compare
|
||
// TODO: Flow in from tools (issue #8332) | ||
_designArgs = Array.Empty<string>(); | ||
_designArgs = (string[])args["remainingArguments"]; |
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.
This should coalesce to empty array.
Fixes #8332
This updates the dotnet-ef, ef and PowerTools to pass in the arguments