From 1d49d007b888074b21c94e045e01b7369a221e2a Mon Sep 17 00:00:00 2001 From: workgroupengineering Date: Thu, 18 Nov 2021 21:37:51 +0100 Subject: [PATCH] fixes: Waite Debugger.IsAttached --- src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs b/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs index 6447a68437..7903bb7a8f 100644 --- a/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs +++ b/src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs @@ -49,9 +49,7 @@ namespace Avalonia.Build.Tasks internal static CompileResult Compile(IBuildEngine engine, string input, string[] references, string projectDirectory, - string output, bool verifyIl, MessageImportance logImportance, string strongNameKey, bool patchCom, - bool skipXamlCompilation - , bool debuggerLaunch) + string output, bool verifyIl, MessageImportance logImportance, string strongNameKey, bool patchCom, bool skipXamlCompilation, bool debuggerLaunch) { var typeSystem = new CecilTypeSystem(references .Where(r => !r.ToLowerInvariant().EndsWith("avalonia.build.tasks.dll")) @@ -89,6 +87,7 @@ namespace Avalonia.Build.Tasks if (debuggerLaunch) { System.Diagnostics.Debugger.Launch(); + while(!Debugger.IsAttached) Thread.Sleep(100); } var asm = typeSystem.TargetAssemblyDefinition; var emres = new EmbeddedResources(asm);