-
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
dotnet-ef: Consider showing output that the project is building #15787
Comments
I have an old branch with this change I've been meaning to get back to... |
Looks perfect! :) |
#12049 is also about making sure we’re not doing anything that slows it down. |
For anyone choosing to implement this, please see @bricelam's branch above for a starting point. |
@bricelam, I am considering working on this issue. How can I test the output of |
@skalpin Type Just kidding. I do this: cd C:\Path\To\EntityFrameworkCore
restore
.dotnet\dotnet run -p src\dotnet-ef -- dbcontext list -p C:\Path\To\DummyProject --verbose |
I am getting I checked and this directory Do I need to build a specific project? |
That's expected--you need to run from the global tool package to make it work end to end. But, if you get that error, all the dotnet-ef logic has executed. |
I rebased your branch onto release/3.0-preview9 here. What needs to change to complete it? |
That change (detailed) was to debug the build perf. You can revert it |
I tried to capture the output in a unit test [Fact]
public void Build_started_note()
{
using (var sw = new StringWriter())
{
var eol = Environment.NewLine;
Console.SetOut(sw);
Reporter.IsVerbose = true;
var project = new Project(@"DummyProject\DummyProject.csproj", null, null, null);
project.Build();
var output = sw.ToString();
Assert.True(output.Contains("Build started"));
Assert.True(output.Contains("Build succeeded."));
}
} but I'll need a dummy project. |
No need for a unit test—they get too flakey. Just verify manually. |
My project takes a while to build. When running
dotnet ef
commands likedotnet ef migrations add MyMigration
the project often gets build first. At the stage when the project starts buildingdotnet ef
has not written any output to the console yet, and it will not write anything to the console until the build has finished. I know that I can see the build output via-v
or--verbose
, but it would be more clear to me if the non-verbose version output a single line of text likeProject is building...
. It would make thedotnet ef
tool feel more responsive, at least for me.So please consider showing output indicating that the project is building.
Further technical details
dotnet ef --version
output:The text was updated successfully, but these errors were encountered: