Skip to content
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

fixed some code #305

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>动态重载开发代码.</Description>
<Description>动态重载控制台代码结果.</Description>
<PackageId>DotNetCore.Natasha.CSharp.Extension.HotReload</PackageId>
<PackageReleaseNotes>升级到最新版.</PackageReleaseNotes>
<PackageTags>Natasha;Compiler;Extension;Codecov;HotReload;</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ private static Task HotExecute()
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine($"Error during hot execution: {ex}");
}
return Task.CompletedTask;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,20 @@ public ValueTask<bool> Run()
Process[] processes = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(_outputNewExeFile));
if (processes.Length > 0)
{
return new ValueTask<bool>(true);
foreach (var item in processes)
{
try
{
if (item.HasExited == false)
{
return new ValueTask<bool>(true);
}
}
catch
{
}

}
}
}
catch (Exception e)
Expand Down
Loading