Skip to content

Commit c1285aa

Browse files
jkoritzinskyolevett
authored andcommitted
feature: add netcoreapp build (#1418)
1 parent e8227e8 commit c1285aa

4 files changed

Lines changed: 27 additions & 3 deletions

File tree

src/Directory.build.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<PropertyGroup Condition="'$(TargetFramework)' == 'MonoAndroid70'">
1919
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
2020
</PropertyGroup>
21+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
22+
</PropertyGroup>
2123

2224
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
2325
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform " Version="5.2.2" />

src/ReactiveUI/Platforms/net45/PlatformRegistrations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void Register(Action<Func<object>, Type> registerFunction)
1313
{
1414
registerFunction(() => new ComponentModelTypeConverter(), typeof(IBindingTypeConverter));
1515
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
16-
RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => DispatcherScheduler.Current);
16+
RxApp.MainThreadScheduler = DefaultScheduler.Instance;
1717
}
1818
}
1919
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MS-PL license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System;
6+
using System.Reactive.Concurrency;
7+
8+
namespace ReactiveUI
9+
{
10+
public class PlatformRegistrations : IWantsToRegisterStuff
11+
{
12+
public void Register(Action<Func<object>, Type> registerFunction)
13+
{
14+
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
15+
RxApp.MainThreadScheduler = DefaultScheduler.Instance;
16+
}
17+
}
18+
}

src/ReactiveUI/ReactiveUI.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70</TargetFrameworks>
3+
<TargetFrameworks>netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70;netcoreapp1.0</TargetFrameworks>
44
<AssemblyName>ReactiveUI</AssemblyName>
55
<RootNamespace>ReactiveUI</RootNamespace>
66
<Description>A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, WPF, Windows Forms, Windows Phone 8.1, Windows Store and Universal Windows Platform (UWP).</Description>
@@ -51,7 +51,11 @@
5151
<ItemGroup Condition=" '$(TargetFramework)' == 'MonoAndroid70' ">
5252
<Compile Include="Platforms\android\**\*.cs" />
5353
<Compile Include="Platforms\xamarin-common\**\*.cs" />
54-
</ItemGroup>
54+
</ItemGroup>
55+
56+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
57+
<Compile Include="Platforms\netcoreapp1.0\**\*.cs" />
58+
</ItemGroup>
5559

5660
<ItemGroup>
5761
<None Update="VariadicTemplates.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="VariadicTemplates.cs" />

0 commit comments

Comments
 (0)