| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0;net8.0-windows10.0.19041</TargetFrameworks>
- <Nullable>enable</Nullable>
- <DefineConstants>$(DefineConstants);LEGACY_SYSTEM_REACTIVE_FACADE</DefineConstants>
- </PropertyGroup>
- <!--
- API compatibility validation.
- See ADR 0006-api-compatibility-verification.md for more information about this configuration.
- -->
- <PropertyGroup>
- <EnablePackageValidation>true</EnablePackageValidation>
- <PackageValidationBaselineVersion>6.0.1</PackageValidationBaselineVersion>
- </PropertyGroup>
-
- <ItemGroup>
- <ApiCompatSuppressionFile Include="ApiCompatSuppressions.xml" />
- </ItemGroup>
- <Target Name="_SetUwpTfmForPackageValidation" BeforeTargets="RunPackageValidation">
- <!-- See ADR 0003-uap-targets.md for an explanation of this. (In short, the package validation tooling doesn't understand UWP.) -->
- <ItemGroup>
- <PackageValidationReferencePath Condition="%(PackageValidationReferencePath.TargetFrameworkMoniker) == '.NETCore,Version=v5.0'" TargetFrameworkMoniker="UAP,Version=10.0.18362.0" TargetPlatformMoniker="Windows,Version=10.0.18362.0" />
- </ItemGroup>
- </Target>
-
- <PropertyGroup>
- <Description>Legacy facade for Reactive Extensions (Rx) for .NET</Description>
- <PackageReadmeFile>readme.md</PackageReadmeFile>
- </PropertyGroup>
- <ItemGroup>
- <None Include="..\NuGet.Facades.Readme.md" Pack="true" PackagePath="\readme.md" />
- </ItemGroup>
- <ItemGroup>
- <!--
- This facade is much newer than the others. The rest were created
- at the time of the Great Unification (Rx 4.0) to provide backwards
- compatibility with Rx 3.1, so they need to retain the same assembly
- version number hack that Rx 3.1 introduced in an attempt to solve
- the plug-in problem described in https://github.com/dotnet/reactive/issues/97
- System.Reactive became a facade much later (Rx 7.0) in order to
- partially unwind the Great Unification. Since we had long since stopped
- using the assembly version number hack, we don't want to apply
- it here. The Directory.build.props file in the facades folder applies
- this, so we need to remove it.
- -->
- <Compile Remove="..\GlobalAssemblyVersion.cs" Link="GlobalAssemblyVersion.cs" />
- </ItemGroup>
- <PropertyGroup>
- <!-- Re-instate the normal versioning behaviour. -->
- <GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
- <GenerateAssemblyVersionInfo>true</GenerateAssemblyVersionInfo>
- </PropertyGroup>
- <!--
- The various platform-specific APIs that System.Reactive used to support are now deprecated,
- because we've moved to a more modular approach with separate packages for each platform, and
- this entails some changes to naming conventions. These deprecated types now live in this facade.
- -->
- <ItemGroup>
- <Compile Remove="Obsolete\**\*.*" />
- <Compile Remove="Obsolete\UWP\Linq\**" />
- <EmbeddedResource Remove="Obsolete\**\*.*" />
- <EmbeddedResource Remove="Obsolete\UWP\Linq\**" />
- <!-- Workaround so the files appear in VS -->
- <None Include="Obsolete\**\*.*" />
- <None Include="..\..\src\System.Reactive.For.WindowsRuntime\AsyncInfoExtensions.cs" Link="Obsolete\UWP\AsyncInfoExtensions.cs" />
- <None Remove="Obsolete\UWP\Linq\**" />
- <None Update="Obsolete\UWP\Strings_PlatformServices.Designer.cs">
- <DependentUpon>Obsolete\UWP\Strings_PlatformServices.resx</DependentUpon>
- </None>
- <None Include="..\..\src\System.Reactive.For.Uwp\Stubs.cs" Link="Obsolete\UWP\Stubs.cs" />
- <None Include="..\..\src\System.Reactive.For.Uwp\ThreadPoolTimerExtensions.cs" Link="Obsolete\UWP\Concurrency\ThreadPoolTimerExtensions.cs" />
- <None Update="Linq\QbservableEx.NAry.tt">
- <Generator>TextTemplatingFileGenerator</Generator>
- <LastGenOutput>QbservableEx.NAry.cs</LastGenOutput>
- </None>
- </ItemGroup>
- <ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0'))">
- <Compile Include="Obsolete\UWP\**\*.cs" />
- <Compile Include="..\..\src\System.Reactive.For.Uwp\Stubs.cs" Link="Obsolete\UWP\Stubs.cs" />
- <Compile Include="..\..\src\System.Reactive.For.Uwp\ThreadPoolTimerExtensions.cs" Link="Obsolete\UWP\Concurrency\ThreadPoolTimerExtensions.cs" />
- </ItemGroup>
- <!-- WindowsRuntime (netX.0-windows and UWP) -->
- <ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
- <EmbeddedResource Include="Obsolete\UWP\Strings_PlatformServices.resx" />
- <Compile Update="Obsolete\UWP\Strings_PlatformServices.Designer.cs">
- <DependentUpon>Obsolete\UWP\Strings_PlatformServices.resx</DependentUpon>
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- </Compile>
- <Compile Include="..\..\src\System.Reactive.For.WindowsRuntime\AsyncInfoExtensions.cs" Link="Obsolete\UWP\AsyncInfoExtensions.cs" />
- <ProjectReference Include="..\..\src\System.Reactive.For.WindowsRuntime\System.Reactive.For.WindowsRuntime.csproj" />
- </ItemGroup>
- <!-- Windows Forms and WPF -->
- <ItemGroup Condition="('$(TargetFramework)' == 'net472') or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
- <ProjectReference Include="..\..\src\System.Reactive.For.WindowsForms\System.Reactive.For.WindowsForms.csproj" />
- <ProjectReference Include="..\..\src\System.Reactive.For.Wpf\System.Reactive.For.Wpf.csproj" />
- </ItemGroup>
-
- <!-- Windows includes for Desktop and UWP -->
- <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
- <Compile Include="Obsolete\Windows\**\*.cs" />
- <EmbeddedResource Include="Obsolete\Windows\**\*.resx" />
- </ItemGroup>
- <!-- .NET FX -->
- <ItemGroup Condition=" '$(TargetFramework)' == 'net472'">
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="WindowsBase" />
-
- <Compile Include="Obsolete\Remoting\**\*.cs" />
- </ItemGroup>
- <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
- <Compile Include="Obsolete\Desktop\**\*.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)'=='uap10.0.18362'">
- <!--
- The .NET SDK doesn't expect TargetFrameworks to include uap10.0.18362, so it doesn't understand
- that this project is capable of using projects that target .NET Standard 2.0, with the result
- that it reports an error when trying to resolve the reference to System.Reactive.Net. So
- when building for UWP, we explicitly set the target framework here.
- -->
- <ProjectReference Include="..\..\src\System.Reactive.Net\System.Reactive.Net.csproj">
- <Aliases>SystemReactiveNet</Aliases>
- <SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)'!='uap10.0.18362'">
- <ProjectReference Include="..\..\src\System.Reactive.Net\System.Reactive.Net.csproj">
- <Aliases>SystemReactiveNet</Aliases>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)'=='uap10.0.18362'">
- <ReferencePath Include="$(TargetPlatformSdkPath)UnionMetadata\10.0.19041.0\Windows.winmd" />
- </ItemGroup>
- <!--
- Put the reference assemblies built by System.Reactive.MakeRefAssemblies into the 'ref' folder of our
- NuGet package.
- -->
- <ItemGroup>
- <ProjectReference Include="..\System.Reactive.MakeRefAssemblies\System.Reactive.MakeRefAssemblies.csproj" PrivateAssets="all">
- <!--
- If we don't set an alias here, all the types exposed by the reference assembly become available in the global namespace,
- which causes compiler errors when the UAP target tries to build a specialized ThreadPoolScheduler.
- -->
- <Aliases>SystemReactiveRefAssembly</Aliases>
- </ProjectReference>
- </ItemGroup>
- <!--
- We need to supply our own nuspec file, because the SDK doesn't appear to be able to populate the <references> section,
- and without that we get NU5131 warnings. (I think this is only strictly necessary for package.config scenarios, but
- Rx has a lot of users, so we'll probably break someone if we don't get this right.)
- We use tokenization so that we can pass package metadata (which include the version number). But it turns out that
- the various NuGet package metadata build properties we want to pass in don't get defined until quite late in the build,
- so we need to set <NuspecProperties> in a custom target that runs just before the GenerateNuspec target.
- -->
- <PropertyGroup>
- <NuspecFile>System.Reactive.nuspec</NuspecFile>
- </PropertyGroup>
- <Target Name="_SetNuspecProperties" BeforeTargets="GenerateNuspec">
- <PropertyGroup>
- <NuspecProperties>id=$(PackageId);version=$(PackageVersion);authors=$(Authors);licenseExpression=$(PackageLicenseExpression);icon=$(PackageIcon);projectUrl=$(PackageProjectUrl);description=$(PackageDescription);copyright=$(Copyright);tags=$(PackageTags);repository=$(RepositoryUrl);commit=$(RepositoryCommit);outputpath=$(OutputPath);refassemblypath=..\System.Reactive.MakeRefAssemblies\bin\$(Configuration)\</NuspecProperties>
- </PropertyGroup>
- </Target>
- </Project>
|