mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Detect VelopackApp.Run() in any method in main module
This commit is contained in:
@@ -7,6 +7,10 @@ try {
|
||||
bool shouldExit = false;
|
||||
bool shouldAutoUpdate = args.Any(a => a.Equals("--autoupdate", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
#if USE_ASYNC_MAIN
|
||||
await Task.Delay(10).ConfigureAwait(false);
|
||||
#endif
|
||||
|
||||
#if !NO_VELO_BUILDER
|
||||
VelopackApp.Build()
|
||||
.SetAutoApplyOnStartup(shouldAutoUpdate)
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
<DefineConstants>NO_VELO_BUILDER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(UseAsyncMain) != '' ">
|
||||
<DefineConstants>USE_ASYNC_MAIN</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Velopack\Velopack.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user