Skip to content

Commit 98adf33

Browse files
committed
Config and filename adjustments, to allow for building on Linux.
1 parent 1ce85f4 commit 98adf33

18 files changed

+41
-40
lines changed
File renamed without changes.

Ix.NET/Documentation/adr/0001-Ix-Ref-Assembly-Mismatches.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ At the time of writing this, the current version of `System.Interactive` is 6.0.
2727
* `net6.0`
2828
* `netstandard2.1`
2929

30-
30+
3131
The use of `net4.8` in `ref` seems to have been a bug: that should have been `net48`. (The main reason I am confident it's a bug, and not a clever but obscure trick that we've not understood, is that the [commit of 2021/12/06 that added this](https://github.com/dotnet/reactive/commit/a2410b2267abe193191f3894d243771ae4b126fd) used [`net48` in reference assemblies for one of the other packages](https://github.com/dotnet/reactive/commit/a2410b2267abe193191f3894d243771ae4b126fd#diff-3b568c93a468dab1b1a619a450bf1c4d88d3ec9539737d09fa6fb7659bc0ae5fR7), so this just seems to have been a slip.)
3232

3333
The other discrepancy is that we have `netstandard2.0` in the `lib` folder but `netstandard2.1` in the ref folder. At first glance, this too looks quite a lot like a mistake, particularly when you examine the history. Here is the point in the release history at which the `ref` folder first started having a `netstandard2.1` folder:
@@ -45,12 +45,12 @@ And yet, on closer inspection, this appears to be deliberate. Looking at this co
4545

4646
https://github.com/dotnet/reactive/commit/0252fb537c9d335b9bc863b65291f152c07ba385
4747

48-
we see a [comment in Ix.NET/Source/refs/Directory.build.props](https://github.com/dotnet/reactive/commit/0252fb537c9d335b9bc863b65291f152c07ba385#diff-909504334cbab5c432709c95ae78c24fb2910d850958af2ef6de444b18e5c8ecR6) saying:
49-
48+
we see a [comment in Ix.NET/Source/refs/Directory.Build.props](https://github.com/dotnet/reactive/commit/0252fb537c9d335b9bc863b65291f152c07ba385#diff-909504334cbab5c432709c95ae78c24fb2910d850958af2ef6de444b18e5c8ecR6) saying:
49+
5050
> This is here so we can create a fake .NET Standard 2.1 facade
5151
5252
I can only guess that they knew .NET Standard 2.1 was coming, and wanted to ensure that `System.Interactive` was ready for it when it shipped.
53-
53+
5454
So it was deliberate. But offering reference assemblies for a platform without any corresponding implementation for that platform is an odd choice. (And although at the time this was a placholder for a forthcoming .NET Standard version, it continued to look like this after .NET Standard 2.1 shipped. All subsequent Ix.NET releases have continued to provide `netstandard2.1` in the `ref` folder with no matching folder in `lib`. So it wasn't just a temporary measure.) What purpose does this serve?
5555

5656
Some of the features that Ix offers eventually became available in .NET Core, such as `EnumerableEx.SkipLast`. This method exists in the implementation assemblies for every TFM of Ix.NET, but the `netstandard2.1` and `net6.0` reference assemblies omit it. This has the effect that if you're targetting any version of .NET recent enough to have these methods built into the .NET runtime libraries, the Ix.NET equivalents will:

Ix.NET/Source/Ix.Async.NET.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1111
AsyncQueryableGenerator.t4 = AsyncQueryableGenerator.t4
1212
..\..\azure-pipelines.ix.yml = ..\..\azure-pipelines.ix.yml
1313
CodeCoverage.runsettings = CodeCoverage.runsettings
14-
Directory.build.props = Directory.build.props
15-
Directory.build.targets = Directory.build.targets
14+
Directory.Build.props = Directory.Build.props
15+
Directory.Build.targets = Directory.Build.targets
1616
global.json = global.json
1717
NuGet.Config = NuGet.Config
1818
version.json = version.json

Ix.NET/Source/Ix.NET.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
..\..\.editorconfig = ..\..\.editorconfig
1414
..\..\azure-pipelines.ix.yml = ..\..\azure-pipelines.ix.yml
1515
CodeCoverage.runsettings = CodeCoverage.runsettings
16-
Directory.build.props = Directory.build.props
17-
Directory.build.targets = Directory.build.targets
16+
Directory.Build.props = Directory.Build.props
17+
Directory.Build.targets = Directory.Build.targets
1818
version.json = version.json
1919
EndProjectSection
2020
EndProject
@@ -61,7 +61,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FasterLinq", "FasterLinq\Fa
6161
EndProject
6262
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Refs", "Refs", "{A3D72E6E-4ADA-42E0-8B2A-055B1F244281}"
6363
ProjectSection(SolutionItems) = preProject
64-
refs\Directory.build.props = refs\Directory.build.props
64+
refs\Directory.Build.props = refs\Directory.Build.props
6565
EndProjectSection
6666
EndProject
6767
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive", "refs\System.Interactive\System.Interactive.csproj", "{2EC0C302-B029-4DDB-AC91-000BF11006AD}"

Rx.NET/Documentation/adr/0001-net7.0-era-tooling-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ The following sections describe how we will deal with each of the issues raised
7474

7575
In all projects that used to target `net5.0`, change this to `net6.0`. Likewise, in any projects that target `net5.0-windows10.0.19041`, change that to `net6.0-windows10.0.19041`.
7676

77-
Modify the entries in `Directory.build.targets`
77+
Modify the entries in `Directory.Build.targets`
7878

79-
Remove the entries in `Directory.build.targets` that refer to the out-of-support TFMs. This means that several preprocessor constants are no longer used. We should scour the codebase and remove all conditionally compiled sections of code that will no longer be used because the target frameworks that used to bring them in no longer exist. The constants no longer in use are:
79+
Remove the entries in `Directory.Build.targets` that refer to the out-of-support TFMs. This means that several preprocessor constants are no longer used. We should scour the codebase and remove all conditionally compiled sections of code that will no longer be used because the target frameworks that used to bring them in no longer exist. The constants no longer in use are:
8080

8181
* `NETSTANDARD1_0`
8282
* `NETSTANDARD1_3`

Rx.NET/Documentation/adr/0003-uap-targets.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ Note that the specific version we actually want to target, 18362, isn't in there
9999

100100
The following sections explain how we enable `uap10.0.18362` to be specified as a target framework, even though the tools do not support this.
101101

102-
The project has `Directory.build.props` and `Directory.build.targets` files. The build tools search for these and automatically load them for all projects in the solution. The `Directory.build.props` file has a `<PropertyGroup>` with a `Condition` that means it runs only when the `uap10.0.18362` target is being built, and it sets numerous properties, as described in the following sections.
102+
The project has `Directory.Build.props` and `Directory.Build.targets` files. The build tools search for these and automatically load them for all projects in the solution. The `Directory.Build.props` file has a `<PropertyGroup>` with a `Condition` that means it runs only when the `uap10.0.18362` target is being built, and it sets numerous properties, as described in the following sections.
103103

104104

105105
#### Target Platform Version
106106

107107
We make our minmum platform version match the one in the TFM:
108108

109-
```xml
109+
```xml
110110
<TargetPlatformMinVersion>10.0.18362</TargetPlatformMinVersion>
111111
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
112112
```
@@ -130,7 +130,7 @@ However, only _some_ properties should use the old name. We need to set _all_ of
130130

131131
#### Compiler Constants
132132

133-
When using the supported UWP build tools (with the old-form project system, which we can't use because we also need to build modern targets), the `WINDOWS_UWP` define constant is set, enabling source code compiled into multiple targets to detect that it is being built for UWP with a `#if WINDOWS_UWP`. So we need this in `Directory.build.props`:
133+
When using the supported UWP build tools (with the old-form project system, which we can't use because we also need to build modern targets), the `WINDOWS_UWP` define constant is set, enabling source code compiled into multiple targets to detect that it is being built for UWP with a `#if WINDOWS_UWP`. So we need this in `Directory.Build.props`:
134134

135135
```xml
136136
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
@@ -141,15 +141,15 @@ When using the supported UWP build tools (with the old-form project system, whic
141141

142142
Normally, when you specify a TFM, the .NET SDK works out what framework library references are required and adds them for you. So if you write `<TargetFramework>net8.0<TargetFramework>` in a project file, you will automatically have access to all the .NET 8.0 runtime libraries. But because the .NET SDK does not support UWP, this doesn't work at all. So we need to do three things.
143143

144-
First, we need to set this property in `Directory.build.props`:
144+
First, we need to set this property in `Directory.Build.props`:
145145

146146
```xml
147147
<NoStdLib>True</NoStdLib>
148148
```
149149

150150
Without this, the build tools attempt to add a reference to `mscorlib.dll`, but they don't seem to realise that a) this is the wrong thing and b) they don't actually have a correct location for that, so the reference ends up being `\mscorlib.dll` (i.e., it looks on the root of the hard drive).
151151

152-
Second we need an `ItemGroup` in `Directory.build.targets` containing this:
152+
Second we need an `ItemGroup` in `Directory.bBild.targets` containing this:
153153

154154
```xml
155155
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform"
@@ -171,7 +171,7 @@ You might be wondering about that 26100 in there. Why is that not 18362, consist
171171

172172
#### Prevent Over-Zealous WinRT Interop Code Generation
173173

174-
The .NET SDK has a feature by which it can generate WinRT versions of .NET types to enable interop between .NET and WinRT code. Unfortunately, the way we've rigged things up to be able to build for `uap10.0.18362.0` seems to cause this to generate these interop types for any .NET class that implements `IDisposable`! This is not helpful. So we disable the feature in `Directory.build.targets`:
174+
The .NET SDK has a feature by which it can generate WinRT versions of .NET types to enable interop between .NET and WinRT code. Unfortunately, the way we've rigged things up to be able to build for `uap10.0.18362.0` seems to cause this to generate these interop types for any .NET class that implements `IDisposable`! This is not helpful. So we disable the feature in `Directory.Build.targets`:
175175

176176
```xml
177177
<CsWinRTAotOptimizerEnabled>false</CsWinRTAotOptimizerEnabled>

Rx.NET/Source/Directory.build.props renamed to Rx.NET/Source/Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1919
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2020
<LangVersion>latest</LangVersion>
21+
<EnableWindowsTargeting>true</EnableWindowsTargeting>
2122
</PropertyGroup>
2223

2324
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
2425
<IncludeSymbols>true</IncludeSymbols>
25-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
26+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2627
</PropertyGroup>
2728

2829
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
@@ -31,7 +32,7 @@
3132

3233
<ItemGroup>
3334
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
34-
35+
3536
<!--
3637
Nerdbank.GitVersioning 3.6.128 injects a reference to a .proj file that doesn't work inside the
3738
UWP test runner project. We don't ship that as a NuGet package, so it doesn't matter what its

Rx.NET/Source/Directory.build.targets renamed to Rx.NET/Source/Directory.Build.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project>
22

33
<!-- This props all need to be set in targets as they depend on the values set earlier -->
4-
5-
<PropertyGroup>
4+
5+
<PropertyGroup>
66
<Product>$(AssemblyName) ($(TargetFramework))</Product>
77
</PropertyGroup>
8-
8+
99
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
1010
<DefineConstants>$(DefineConstants);HAS_WINFORMS;HAS_WPF;HAS_WINRT;HAS_DISPATCHER;HAS_REMOTING;DESKTOPCLR;NO_NULLABLE_ATTRIBUTES</DefineConstants>
1111
</PropertyGroup>

Rx.NET/Source/System.Reactive.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1919
.editorconfig = .editorconfig
2020
analyzers.globalconfig = analyzers.globalconfig
2121
..\..\azure-pipelines.rx.yml = ..\..\azure-pipelines.rx.yml
22-
Directory.build.props = Directory.build.props
23-
Directory.build.targets = Directory.build.targets
22+
Directory.Build.props = Directory.Build.props
23+
Directory.Build.targets = Directory.Build.targets
2424
global.json = global.json
2525
Rx.ruleset = Rx.ruleset
2626
Test.ruleset = Test.ruleset
@@ -30,13 +30,13 @@ EndProject
3030
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D324579D-CBE6-4867-8980-D7842C7C45A2}"
3131
ProjectSection(SolutionItems) = preProject
3232
tests\.editorconfig = tests\.editorconfig
33-
tests\Directory.build.props = tests\Directory.build.props
34-
tests\Directory.build.targets = tests\Directory.build.targets
33+
tests\Directory.Build.props = tests\Directory.Build.props
34+
tests\Directory.Build.targets = tests\Directory.Build.targets
3535
EndProjectSection
3636
EndProject
3737
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Facades", "Facades", "{A0F39260-B8F8-4FCB-9679-0ED917A22BDF}"
3838
ProjectSection(SolutionItems) = preProject
39-
facades\Directory.build.props = facades\Directory.build.props
39+
facades\Directory.Build.props = facades\Directory.Build.props
4040
facades\System.Reactive.Compatibility.nuspec = facades\System.Reactive.Compatibility.nuspec
4141
EndProjectSection
4242
EndProject

Rx.NET/Source/facades/Directory.build.props renamed to Rx.NET/Source/facades/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
2-
<Import Project="..\Directory.build.props" />
2+
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
55
<GenerateAssemblyVersionInfo>false</GenerateAssemblyVersionInfo>

0 commit comments

Comments
 (0)