From b2a0f150f246906effd098bf5665bb1828bc2523 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Tue, 7 Feb 2017 21:34:58 +0300 Subject: [PATCH] Fixed AppBuilder for net core --- src/Avalonia.DotNetCoreRuntime/AppBuilder.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.DotNetCoreRuntime/AppBuilder.cs b/src/Avalonia.DotNetCoreRuntime/AppBuilder.cs index 5a6b82573b..2b9b3083b1 100644 --- a/src/Avalonia.DotNetCoreRuntime/AppBuilder.cs +++ b/src/Avalonia.DotNetCoreRuntime/AppBuilder.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using Avalonia.Controls; @@ -15,7 +16,9 @@ namespace Avalonia /// Initializes a new instance of the class. /// public AppBuilder() - : base(new StandardRuntimePlatform(), () => StandardRuntimePlatformServices.Register()) + : base(new StandardRuntimePlatform(), + builder => StandardRuntimePlatformServices.Register(builder.Instance?.GetType() + ?.GetTypeInfo().Assembly)) { }