Directory.build.props 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <Project>
  2. <PropertyGroup>
  3. <Copyright>Copyright (c) .NET Foundation and Contributors.</Copyright>
  4. <MinClientVersion>2.12</MinClientVersion>
  5. <GenerateDocumentationFile>true</GenerateDocumentationFile>
  6. <Authors>.NET Foundation and Contributors</Authors>
  7. <PackageIcon>icon.png</PackageIcon>
  8. <PackageProjectUrl>https://github.com/dotnet/reactive</PackageProjectUrl>
  9. <PackageLicenseExpression>MIT</PackageLicenseExpression>
  10. <SignAssembly>true</SignAssembly>
  11. <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)ReactiveX.snk</AssemblyOriginatorKeyFile>
  12. <NoWarn>$(NoWarn);1701;1702;CS1591;NU5105</NoWarn>
  13. <DefaultLanguage>en-US</DefaultLanguage>
  14. <IncludeSymbols>false</IncludeSymbols>
  15. <IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
  16. <GeneratePackageOnBuild Condition=" '$(IsTestProject)' != 'true' and '$(CreatePackage)' == 'true' ">true</GeneratePackageOnBuild>
  17. <PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath>
  18. <EmbedUntrackedSources>true</EmbedUntrackedSources>
  19. <PublishRepositoryUrl>true</PublishRepositoryUrl>
  20. <LangVersion>latest</LangVersion>
  21. </PropertyGroup>
  22. <PropertyGroup Condition="'$(Configuration)' != 'Debug'">
  23. <IncludeSymbols>true</IncludeSymbols>
  24. <SymbolPackageFormat>snupkg</SymbolPackageFormat>
  25. </PropertyGroup>
  26. <PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
  27. <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
  28. </PropertyGroup>
  29. <ItemGroup>
  30. <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
  31. <!--
  32. Nerdbank.GitVersioning 3.6.128 injects a reference to a .proj file that doesn't work inside the
  33. UWP test runner project. We don't ship that as a NuGet package, so it doesn't matter what its
  34. version number is.
  35. -->
  36. <PackageReference
  37. Include="Nerdbank.GitVersioning"
  38. Version="3.6.128"
  39. PrivateAssets="all"
  40. Condition="$(ProjectName) != 'Tests.System.Reactive.Uwp.DeviceRunner'" />
  41. </ItemGroup>
  42. <ItemGroup>
  43. <None Include="$(MSBuildThisFileDirectory)../Resources/Artwork/Logo.png" Pack="true" PackagePath="\icon.png"/>
  44. </ItemGroup>
  45. <ItemGroup Condition="'$(IsTestProject)' == 'true'">
  46. <PackageReference Include="coverlet.collector" Version="3.2.0" />
  47. </ItemGroup>
  48. <PropertyGroup>
  49. <AnalysisLevelDesign>7.0-default</AnalysisLevelDesign>
  50. <AnalysisLevelNaming>7.0-all</AnalysisLevelNaming>
  51. <AnalysisLevelPerformance>7.0-all</AnalysisLevelPerformance>
  52. <!-- Enable analyzers on older targets. -->
  53. <EnableNETAnalyzers>true</EnableNETAnalyzers>
  54. <!--
  55. Disabled diagnostics:
  56. CA1001 - types holding disposable fields should implement IDisposable. See next item.
  57. CA2213 - IDisposable types should Dispose any IDisposable fields. This rule finds over 600
  58. examples! These are all in subtle multithreaded or async code. Some of them appear
  59. not to be real problems. For example, there are places where schedulers retain
  60. references to IDisposable work items, but that IDisposable interfaces is only there
  61. to enable application code to cancel scheduled work, so it's not Rx's place to call
  62. Dispose. And there are more subtle cases where disposal is deferred to give threads
  63. a chance to shut down. Each of these likely needs individual review:
  64. https://github.com/dotnet/reactive/issues/1927
  65. IDE0056 - Use of index/range syntax - relevant types not available on all targets, so we can't
  66. IDE0057 do this.
  67. IDE0290 - Primary ctors. This diagnostic suggests them in a lot of places where we don't want
  68. them. E.g., in most types with multiple constructors I find I prefer not to have
  69. a primary ctor. Since this is all or nothing, we turn it off.
  70. IDE0305 - Suggests Collection expressions in place of .ToArray. E.g, wants to change this:
  71. _readyList.ToArray()
  72. to this:
  73. [.. readyList]
  74. This won't improve performance as far as we know (sometimes a reason for using that
  75. syntax), and it's not obviously an improvement in readability.
  76. CA1510 - use ArgumentNullException.ThrowIf (not available on all targets)
  77. CA1513 - use ObjectDisposedException.ThrowIf (not available on all targets)
  78. -->
  79. <NoWarn>$(NoWarn);CA1001;CA2213;CA1510;CA1513;IDE0056;IDE0057;IDE0290;IDE0305</NoWarn>
  80. </PropertyGroup>
  81. <ItemGroup>
  82. <GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)analyzers.globalconfig" />
  83. </ItemGroup>
  84. </Project>