Skip to content

Commit ee70f99

Browse files
author
Oren Novotny
authored
Merge pull request #734 from dotnet/ix-refs
Ix Reference Assemblies
2 parents 393b157 + d6cbcb6 commit ee70f99

File tree

7 files changed

+85
-3
lines changed

7 files changed

+85
-3
lines changed

.vsts.ix-shared.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ steps:
1414
displayName: Set Version
1515
condition: eq(variables['system.pullrequest.isfork'], false)
1616

17+
- task: DotNetCoreCLI@2
18+
inputs:
19+
command: build
20+
projects: Ix.NET/Source/refs/**/System.Interactive*.csproj
21+
arguments: -c $(BuildConfiguration)
22+
displayName: Build reference assemblies
23+
1724
- task: DotNetCoreCLI@2
1825
inputs:
1926
command: pack

Ix.NET/Source/Directory.build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
1313
<SignAssembly>true</SignAssembly>
1414
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)ReactiveX.snk</AssemblyOriginatorKeyFile>
15-
<NoWarn>$(NoWarn);1701;1702;CS1591</NoWarn>
15+
<NoWarn>$(NoWarn);1701;1702;CS1591;NU5105</NoWarn>
1616
<DefaultLanguage>en-US</DefaultLanguage>
1717
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
1818
<DebugType>embedded</DebugType>

Ix.NET/Source/Ix.NET.sln

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{87534290
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B733D97A-F1ED-4FC3-BF8E-9AC47A89DE96}"
99
ProjectSection(SolutionItems) = preProject
10+
..\..\.vsts.ix-ci.yml = ..\..\.vsts.ix-ci.yml
11+
..\..\.vsts.ix-pr.yml = ..\..\.vsts.ix-pr.yml
12+
..\..\.vsts.ix-shared.yml = ..\..\.vsts.ix-shared.yml
1013
CodeCoverage.runsettings = CodeCoverage.runsettings
1114
Directory.build.props = Directory.build.props
1215
Directory.build.targets = Directory.build.targets
@@ -25,6 +28,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive.Tests",
2528
EndProject
2629
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive.Async.Tests", "System.Interactive.Async.Tests\System.Interactive.Async.Tests.csproj", "{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}"
2730
EndProject
31+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Refs", "Refs", "{A3D72E6E-4ADA-42E0-8B2A-055B1F244281}"
32+
EndProject
33+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive", "refs\System.Interactive\System.Interactive.csproj", "{2EC0C302-B029-4DDB-AC91-000BF11006AD}"
34+
EndProject
2835
Global
2936
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3037
Debug|Any CPU = Debug|Any CPU
@@ -55,13 +62,18 @@ Global
5562
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
5663
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
5764
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}.Release|Any CPU.Build.0 = Release|Any CPU
65+
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
66+
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
67+
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
68+
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Release|Any CPU.Build.0 = Release|Any CPU
5869
EndGlobalSection
5970
GlobalSection(SolutionProperties) = preSolution
6071
HideSolutionNode = FALSE
6172
EndGlobalSection
6273
GlobalSection(NestedProjects) = preSolution
6374
{AFD2E6EC-C5B0-4276-A14A-467D786D0DDA} = {87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}
6475
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC} = {87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}
76+
{2EC0C302-B029-4DDB-AC91-000BF11006AD} = {A3D72E6E-4ADA-42E0-8B2A-055B1F244281}
6577
EndGlobalSection
6678
GlobalSection(ExtensibilityGlobals) = postSolution
6779
SolutionGuid = {9B5F6126-CBBA-4C3A-A3BB-26AFE56DABEC}

Ix.NET/Source/System.Interactive/Skip.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace System.Linq
88
{
99
public static partial class EnumerableEx
1010
{
11+
#if !(REF_ASSM && NETCOREAPP2_0)
1112
/// <summary>
1213
/// Bypasses a specified number of contiguous elements from the end of the sequence and returns the remaining elements.
1314
/// </summary>
@@ -32,6 +33,7 @@ public static IEnumerable<TSource> SkipLast<TSource>(this IEnumerable<TSource> s
3233

3334
return source.SkipLast_(count);
3435
}
36+
#endif
3537

3638
private static IEnumerable<TSource> SkipLast_<TSource>(this IEnumerable<TSource> source, int count)
3739
{
@@ -47,4 +49,4 @@ private static IEnumerable<TSource> SkipLast_<TSource>(this IEnumerable<TSource>
4749
}
4850
}
4951
}
50-
}
52+
}

Ix.NET/Source/System.Interactive/System.Interactive.csproj

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,37 @@
1212
<EmbeddedResource Include="Properties\System.Interactive.rd.xml" />
1313
</ItemGroup>
1414

15+
<PropertyGroup>
16+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);GetRefs</TargetsForTfmSpecificContentInPackage>
17+
</PropertyGroup>
18+
19+
20+
<Target Name="GetRefs">
21+
22+
<MSBuild Projects="..\refs\System.Interactive\System.Interactive.csproj"
23+
Targets="_GetReferenceAssemblies"
24+
Properties="TargetFramework=$(TargetFramework)">
25+
26+
<Output TaskParameter="TargetOutputs" ItemName="_refAssms" />
27+
</MSBuild>
28+
29+
<ItemGroup>
30+
<TfmSpecificPackageFile Include="@(_refAssms)" PackagePath="ref/$(TargetFramework)" />
31+
</ItemGroup>
32+
</Target>
33+
34+
<Target Name="GetRefsWithoutLib" BeforeTargets="_GetPackageFiles">
35+
<MSBuild Projects="..\refs\System.Interactive\System.Interactive.csproj"
36+
Targets="_GetReferenceAssemblies"
37+
Properties="TargetFramework=netcoreapp2.0">
38+
39+
<Output TaskParameter="TargetOutputs" ItemName="_refAssms20" />
40+
</MSBuild>
41+
42+
<ItemGroup>
43+
<None Include="@(_refAssms20)" PackagePath="ref/netcoreapp2.0" Pack="true" />
44+
</ItemGroup>
45+
46+
</Target>
47+
1548
</Project>

Ix.NET/Source/System.Interactive/Take.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace System.Linq
88
{
99
public static partial class EnumerableEx
1010
{
11+
#if !(REF_ASSM && NETCOREAPP2_0)
1112
/// <summary>
1213
/// Returns a specified number of contiguous elements from the end of the sequence.
1314
/// </summary>
@@ -29,6 +30,7 @@ public static IEnumerable<TSource> TakeLast<TSource>(this IEnumerable<TSource> s
2930

3031
return source.TakeLast_(count);
3132
}
33+
#endif
3234

3335
private static IEnumerable<TSource> TakeLast_<TSource>(this IEnumerable<TSource> source, int count)
3436
{
@@ -55,4 +57,4 @@ private static IEnumerable<TSource> TakeLast_<TSource>(this IEnumerable<TSource>
5557
}
5658
}
5759
}
58-
}
60+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>Interactive Extensions Main Library used to express queries over enumerable sequences.</Description>
5+
<AssemblyTitle>Interactive Extensions - Main Library</AssemblyTitle>
6+
<Authors>Microsoft</Authors>
7+
<TargetFrameworks>net45;netstandard1.0;netstandard2.0;netcoreapp2.0</TargetFrameworks>
8+
<PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
9+
<DefineConstants>$(DefineConstants);REF_ASSM</DefineConstants>
10+
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
11+
<Deterministic>true</Deterministic>
12+
<IsPackable>false</IsPackable>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<Compile Include="..\..\System.Interactive\**\*.cs" Exclude="..\..\System.Interactive\obj\**" />
17+
</ItemGroup>
18+
19+
<Target Name="_GetReferenceAssemblies" DependsOnTargets="Build" Returns="@(ReferenceAssembliesOutput)">
20+
<ItemGroup>
21+
<ReferenceAssembliesOutput Include="@(IntermediateRefAssembly->'%(FullPath)')" />
22+
<ReferenceAssembliesOutput Include="@(DocumentationProjectOutputGroupOutput->'%(FullPath)')" />
23+
</ItemGroup>
24+
</Target>
25+
26+
</Project>

0 commit comments

Comments
 (0)