From f6e84abcfeb0f7f940f2ca7c142156dad458f5d2 Mon Sep 17 00:00:00 2001 From: Jack Fistelmann Date: Sat, 17 Feb 2024 13:26:13 +0100 Subject: [PATCH] fix(): dotnet watch appears to stuck on building closes #8 --- README.md | 1 + src/AbpDevTools/Commands/RunningProjectItem.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 2c552e6..59fdc34 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ Convention: `*.csproj` files with specific names are considered as applications ```bash abpdev run -w ``` + > Please note that we cannot print URL's because dotnet does give any output. ## Virtual Environments Virtual environments are used to run multiple solutions with different configurations. For example, you can run different solutions with different environments _(connectionstrings etc.)_. diff --git a/src/AbpDevTools/Commands/RunningProjectItem.cs b/src/AbpDevTools/Commands/RunningProjectItem.cs index 4db5abd..18087c1 100644 --- a/src/AbpDevTools/Commands/RunningProjectItem.cs +++ b/src/AbpDevTools/Commands/RunningProjectItem.cs @@ -49,6 +49,15 @@ protected virtual void OutputReceived(object sender, DataReceivedEventArgs args) IsCompleted = true; } + if (args.Data != null && + args.Data.Contains("dotnet watch ") && + args.Data.Contains(" Started")) + { + Status = args.Data; + Process?.CancelOutputRead(); + IsCompleted = true; + } + if (DateTime.Now - Process?.StartTime > TimeSpan.FromMinutes(5)) { Status = "Stale";