Skip to content

Commit 90052f0

Browse files
author
Oren Novotny
committed
Add .NET Core 3 target
1 parent 57868ce commit 90052f0

File tree

13 files changed

+106
-38
lines changed

13 files changed

+106
-38
lines changed

Rx.NET/Source/Directory.build.props

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,5 @@
2323
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2424
<LangVersion>latest</LangVersion>
2525
</PropertyGroup>
26-
27-
<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false'">
28-
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62925-02" PrivateAssets="All"/>
30-
</ItemGroup>
31-
32-
<ItemGroup>
33-
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.23" PrivateAssets="all" />
34-
</ItemGroup>
35-
36-
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
37-
<ItemGroup>
38-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
39-
<_Parameter1>CommitHash</_Parameter1>
40-
<_Parameter2>$(SourceRevisionId)</_Parameter2>
41-
</AssemblyAttribute>
42-
</ItemGroup>
43-
</Target>
4426

4527
</Project>
Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<!-- This props all need to be set in targets as they depend on the values set earlier -->
33
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
4-
<DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;DESKTOPCLR</DefineConstants>
4+
<DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;HAS_WINFORMS;HAS_DISPATCHER;PREFER_ASYNC;HAS_TPL46;DESKTOPCLR</DefineConstants>
55
</PropertyGroup>
66
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
77
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
@@ -11,7 +11,30 @@
1111
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
1212
<DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;WINDOWS</DefineConstants>
1313
</PropertyGroup>
14-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp2.0'">
14+
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp2.1'">
1515
<DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING</DefineConstants>
1616
</PropertyGroup>
17+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
18+
<DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;HAS_WINFORMS;HAS_DISPATCHER;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;DESKTOPCLR</DefineConstants>
19+
</PropertyGroup>
20+
21+
22+
<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false' and '$(TargetFramework)' != 'netcoreapp3.0'">
23+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />
24+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62925-02" PrivateAssets="All"/>
25+
</ItemGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.33" PrivateAssets="all" />
29+
</ItemGroup>
30+
31+
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
32+
<ItemGroup>
33+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
34+
<_Parameter1>CommitHash</_Parameter1>
35+
<_Parameter2>$(SourceRevisionId)</_Parameter2>
36+
</AssemblyAttribute>
37+
</ItemGroup>
38+
</Target>
39+
1740
</Project>

Rx.NET/Source/System.Reactive.sln

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26606.0
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.28407.52
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive", "src\System.Reactive\System.Reactive.csproj", "{01706A0F-8A63-4FD6-AF45-0BC0BED3C0D9}"
77
EndProject
@@ -15,9 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.System.Reactive.Uwp.D
1515
EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{870348D0-C0A0-4352-8A02-E00AB0CCB919}"
1717
ProjectSection(SolutionItems) = preProject
18-
..\..\.vsts.rx-ci.yml = ..\..\.vsts.rx-ci.yml
19-
..\..\.vsts.rx-pr.yml = ..\..\.vsts.rx-pr.yml
20-
..\..\.vsts.rx-shared.yml = ..\..\.vsts.rx-shared.yml
18+
..\..\azure-pipelines.rx.yml = ..\..\azure-pipelines.rx.yml
2119
Directory.build.props = Directory.build.props
2220
Directory.build.targets = Directory.build.targets
2321
global.json = global.json

Rx.NET/Source/global.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2+
"sdk": {
3+
"version": "3.0.100-preview"
4+
},
25
"msbuild-sdks": {
3-
"MSBuild.Sdk.Extras": "1.6.65"
6+
"MSBuild.Sdk.Extras": "2.0.0-preview.7"
47
}
58
}

Rx.NET/Source/src/Microsoft.Reactive.Testing/Microsoft.Reactive.Testing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22
<PropertyGroup>
3-
<TargetFrameworks>net46;uap10.0;netstandard2.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.0;net46;uap10.0;netstandard2.0</TargetFrameworks>
44
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
55
<Description>Reactive Extensions Testing Library containing interfaces and classes providing functionality to test applications and libraries built using Reactive Extensions.</Description>
66
<AssemblyTitle>Microsoft.Reactive.Testing - Testing Helper Library</AssemblyTitle>

Rx.NET/Source/src/System.Reactive/System.Reactive.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net46;uap10.0;uap10.0.16299</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.0;netstandard2.0;net46;uap10.0;uap10.0.16299</TargetFrameworks>
44
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
55
<PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>
66
<Description>Reactive Extensions (Rx) for .NET</Description>
77
</PropertyGroup>
88

9+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
10+
<UseWPF>true</UseWPF>
11+
<UseWindowsForms>true</UseWindowsForms>
12+
</PropertyGroup>
13+
914

1015
<ItemGroup>
1116
<Compile Remove="Platforms\**\*.*" />
@@ -34,7 +39,7 @@
3439
</ItemGroup>
3540

3641
<!-- Windows includes for Desktop and UWP -->
37-
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' or $(TargetFramework.StartsWith('uap10.0')) ">
42+
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' or $(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'netcoreapp3.0'">
3843
<Compile Include="Platforms\Windows\**\*.cs" />
3944
<EmbeddedResource Include="Platforms\Windows\**\*.resx" />
4045
</ItemGroup>
@@ -45,6 +50,9 @@
4550
<Reference Include="System.Windows" />
4651
<Reference Include="System.Windows.Forms" />
4752
<Reference Include="WindowsBase" />
53+
</ItemGroup>
54+
55+
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netcoreapp3.0'">
4856
<Compile Include="Platforms\Desktop\**\*.cs" />
4957
</ItemGroup>
5058

Rx.NET/Source/tests/Tests.System.Reactive/DispatcherHelpers.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NETCOREAPP1_1 || NET46 || NETCOREAPP1_0
5+
#if NETCOREAPP2_1 || NET46 || NETCOREAPP3_0
66
using System.Threading;
77
#endif
88
#if HAS_DISPATCHER
9+
using System;
910
using System.Windows.Threading;
1011
#endif
1112

Rx.NET/Source/tests/Tests.System.Reactive/Tests.System.Reactive.csproj

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="MSBuild.Sdk.Extras">
22
<PropertyGroup>
3-
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.0;net46;netcoreapp2.1</TargetFrameworks>
44
<NoWarn>$(NoWarn);CS0618</NoWarn>
55
</PropertyGroup>
6-
6+
7+
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
8+
<UseWPF>true</UseWPF>
9+
<UseWindowsForms>true</UseWindowsForms>
10+
</PropertyGroup>
11+
12+
713
<ItemGroup>
814
<Content Include="xunit.runner.json">
915
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -15,9 +21,9 @@
1521
<Reference Include="WindowsBase" />
1622
</ItemGroup>
1723
<ItemGroup>
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0-preview-20180610-02" />
19-
<PackageReference Include="xunit" Version="2.4.0-beta.2.build4010" />
20-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0-beta.2.build4010" />
24+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0-preview-20181205-02" />
25+
<PackageReference Include="xunit" Version="2.4.1" />
26+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
2127
<ProjectReference Include="..\..\src\System.Reactive\System.Reactive.csproj" />
2228
<ProjectReference Include="..\..\src\System.Reactive.Observable.Aliases\System.Reactive.Observable.Aliases.csproj" />
2329
<ProjectReference Include="..\..\src\Microsoft.Reactive.Testing\Microsoft.Reactive.Testing.csproj" />

Rx.NET/Source/tests/Tests.System.Reactive/Tests/Concurrency/SchedulerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public void Scheduler_Periodic2()
375375
}
376376
#endif
377377

378-
#if DESKTOPCLR
378+
#if DESKTOPCLR && NET46
379379
[Fact]
380380
public void Scheduler_Periodic_HostLifecycleManagement()
381381
{

Rx.NET/Source/tests/Tests.System.Reactive/Tests/Linq/Observable/FromEventPatternTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ public void FromEventPattern_Reflection_Instance_E3()
474474
);
475475
}
476476

477-
#if DESKTOPCLR
477+
#if DESKTOPCLR && NET46
478478
[Fact]
479479
public void FromEventPattern_Reflection_Instance_MissingAccessors()
480480
{

0 commit comments

Comments
 (0)