System.Reactive.MakeRefAssemblies.csproj 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <PropertyGroup>
  3. <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0;net8.0-windows10.0.19041</TargetFrameworks>
  4. <Nullable>enable</Nullable>
  5. <!--
  6. We seem to get spurious CA1812 warnings (internal class apparently never instantiated. The same code compiles
  7. without warnings when built as a normal library, so this seems to be an issue with the refernce assembly build.
  8. -->
  9. <NoWarn>$(NoWarn);CA1812</NoWarn>
  10. <DefineConstants>$(DefineConstants);LEGACY_SYSTEM_REACTIVE_FACADE;BUILDING_REFERENCE_ASSEMBLY</DefineConstants>
  11. <ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
  12. <TargetName>System.Reactive</TargetName>
  13. </PropertyGroup>
  14. <ItemGroup>
  15. <!--
  16. See comments in System.Reactive for explanation of this and the
  17. PropertyGroup that follows.
  18. -->
  19. <Compile Remove="..\GlobalAssemblyVersion.cs" Link="GlobalAssemblyVersion.cs" />
  20. </ItemGroup>
  21. <PropertyGroup>
  22. <!-- Re-instate the normal versioning behaviour. -->
  23. <GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
  24. <GenerateAssemblyVersionInfo>true</GenerateAssemblyVersionInfo>
  25. </PropertyGroup>
  26. <ItemGroup>
  27. <Compile Include="..\System.Reactive\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);..\System.Reactive\obj\**\*;..\System.Reactive\bin\**\*" />
  28. <Compile Remove="..\System.Reactive\Obsolete\**\*.*" />
  29. <!-- Workaround so the files appear in VS -->
  30. <None Include="..\System.Reactive\Obsolete\**\*.*" />
  31. </ItemGroup>
  32. <ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0'))">
  33. <Compile Include="..\System.Reactive\Obsolete\UWP\**\*.cs" />
  34. <Compile Include="..\..\src\System.Reactive.For.Uwp\Stubs.cs" Link="Obsolete\UWP\Stubs.cs" />
  35. <Compile Include="..\..\src\System.Reactive.For.Uwp\ThreadPoolTimerExtensions.cs" Link="Obsolete\UWP\Concurrency\ThreadPoolTimerExtensions.cs" />
  36. </ItemGroup>
  37. <!-- Windows includes for Desktop and UWP -->
  38. <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
  39. <Compile Include="..\System.Reactive\Obsolete\Windows\**\*.cs" />
  40. <EmbeddedResource Include="..\System.Reactive\Obsolete\Windows\**\*.resx" />
  41. </ItemGroup>
  42. <!-- .NET FX -->
  43. <ItemGroup Condition=" '$(TargetFramework)' == 'net472'">
  44. <Reference Include="System.Windows" />
  45. <Reference Include="System.Windows.Forms" />
  46. <Reference Include="WindowsBase" />
  47. <Compile Include="..\System.Reactive\Obsolete\Remoting\**\*.cs" />
  48. </ItemGroup>
  49. <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
  50. <Compile Include="..\System.Reactive\Obsolete\Desktop\**\*.cs" />
  51. </ItemGroup>
  52. <!-- WindowsRuntime (netX.0-windows and UWP) -->
  53. <ItemGroup Condition="$(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
  54. <ProjectReference Include="..\..\src\System.Reactive.For.WindowsRuntime\System.Reactive.For.WindowsRuntime.csproj" />
  55. </ItemGroup>
  56. <!-- Windows Forms and WPF -->
  57. <ItemGroup Condition="('$(TargetFramework)' == 'net472') or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
  58. <ProjectReference Include="..\..\src\System.Reactive.For.WindowsForms\System.Reactive.For.WindowsForms.csproj" />
  59. <ProjectReference Include="..\..\src\System.Reactive.For.Wpf\System.Reactive.For.Wpf.csproj" />
  60. </ItemGroup>
  61. <ItemGroup Condition="'$(TargetFramework)'=='uap10.0.18362'">
  62. <!--
  63. The .NET SDK doesn't expect TargetFrameworks to include uap10.0.18362, so it doesn't understand
  64. that this project is capable of using projects that target .NET Standard 2.0, with the result
  65. that it reports an error when trying to resolve the reference to System.Reactive.Net. So
  66. when building for UWP, we explicitly set the target framework here.
  67. -->
  68. <ProjectReference Include="..\..\src\System.Reactive.Net\System.Reactive.Net.csproj">
  69. <Aliases>SystemReactiveNet</Aliases>
  70. <SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
  71. </ProjectReference>
  72. </ItemGroup>
  73. <ItemGroup Condition="'$(TargetFramework)'!='uap10.0.18362'">
  74. <ProjectReference Include="..\..\src\System.Reactive.Net\System.Reactive.Net.csproj">
  75. <Aliases>SystemReactiveNet</Aliases>
  76. </ProjectReference>
  77. </ItemGroup>
  78. <ItemGroup Condition="'$(TargetFramework)'=='uap10.0.18362'">
  79. <ReferencePath Include="$(TargetPlatformSdkPath)UnionMetadata\10.0.19041.0\Windows.winmd" />
  80. </ItemGroup>
  81. </Project>