diff --git a/src/Orchestra.Core/Helpers/DotNetPatchHelper.cs b/src/Orchestra.Core/Helpers/DotNetPatchHelper.cs index 613c92a4..2a853731 100644 --- a/src/Orchestra.Core/Helpers/DotNetPatchHelper.cs +++ b/src/Orchestra.Core/Helpers/DotNetPatchHelper.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Threading; + using Catel; using Catel.Logging; /// @@ -28,6 +29,11 @@ public static class DotNetPatchHelper /// public static void Initialize() { + if (CatelEnvironment.IsInDesignMode) + { + return; + } + Attach(); } @@ -45,6 +51,11 @@ public static void Detach() private static void AttachToAppDomain() { + if (CatelEnvironment.IsInDesignMode) + { + return; + } + if (_isAppDomainInitialized) { return; @@ -77,6 +88,11 @@ private static void DetachFromAppDomain() private static void AttachToApplication() { + if (CatelEnvironment.IsInDesignMode) + { + return; + } + if (_isApplicationInitialized) { return;