Skip to content

Commit 89a109e

Browse files
committed
build: refresh project-system
1 parent 7fefd3c commit 89a109e

File tree

8 files changed

+179
-39
lines changed

8 files changed

+179
-39
lines changed

.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ dotnet_diagnostic.CA1859.severity = suggestion
359359
dotnet_diagnostic.CA2000.severity = warning
360360
dotnet_code_quality.CA2000.excluded_type_names_with_derived_types = T:Dnet.Testing.Composition.CompositionContextBase
361361
dotnet_diagnostic.CA2002.severity = warning
362-
dotnet_diagnostic.CA2007.severity = warning
362+
dotnet_diagnostic.CA2007.severity = error
363363
dotnet_diagnostic.CA2008.severity = warning
364364
dotnet_diagnostic.CA2119.severity = warning
365365
dotnet_diagnostic.CA2153.severity = warning

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.100",
3+
"version": "9.0.100",
44
"rollForward": "latestMajor"
55
}
66
}

shared/BannedSymbols.Default.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ P:MongoDB.Driver.WriteConcern.Unacknowledged;Use W1 write concern instead
44
P:MongoDB.Driver.WriteConcern.Acknowledged;Consider using WMajority or W1 write concerns instead
55
P:MongoDB.Driver.WriteConcern.W2;Use WMajority write concern instead
66
P:MongoDB.Driver.WriteConcern.W3;Use WMajority write concern instead
7-
P:MongoDB.Driver.ReadPreference.Primary;Use PrimaryPreferred read preference instead
8-
P:MongoDB.Driver.ReadPreference.Secondary;Use Nearest or SecondaryPreferred read preference instead
9-
P:MongoDB.Driver.ReadPreference.SecondaryPreferred;Consider using Nearest read preference instead
7+
P:MongoDB.Driver.ReadPreference.Primary;Use PrimaryPreferred read preference instead, since primary-only is too strict, unless specified by default
8+
P:MongoDB.Driver.ReadPreference.Secondary;Use Nearest (recommended) or SecondaryPreferred read preference instead, since secondary-only is too strict
9+
P:MongoDB.Driver.ReadPreference.SecondaryPreferred;Prefer using Nearest read preference instead, since SecondaryPreferred may introduce unwanted load shift after failover
1010
M:Newtonsoft.Json.JsonSerializer.Create();Use JsonSerializer.CreateDefault() or JsonSerializer.Create(JsonSerializerSettings) instead
1111
M:Newtonsoft.Json.JsonSerializer.Create(Newtonsoft.Json.JsonSerializerSettings);Consider using JsonSerializer.CreateDefault() instead
12-
P:System.DateTime.UtcNow;Use System.TimeProvider.GetUtcNow() instead
13-
P:System.TimeProvider.System; Use injected TimeProvider instead
12+
P:System.DateTime.UtcNow;Use System.TimeProvider.GetUtcNow()/GetUtcDateTime() instead
13+
P:System.DateTimeOffset.UtcNow;Use System.TimeProvider.GetUtcNow() instead
14+
P:System.TimeProvider.System;Use injected TimeProvider instead
1415
P:System.Diagnostics.Stopwatch.Elapsed;Use System.TimeProvider.GetElapsedTime() instead, unless performance-constrained, since Stopwatch isn't testable
1516
P:System.Diagnostics.Stopwatch.ElapsedMilliseconds;Use System.TimeProvider.GetElapsedTime() instead, unless performance-constrained, since Stopwatch isn't testable
1617
P:System.Diagnostics.Stopwatch.ElapsedTicks;Use System.TimeProvider.GetElapsedTime() instead, unless performance-constrained, since Stopwatch isn't testable

shared/BannedSymbols.txt

Lines changed: 152 additions & 22 deletions
Large diffs are not rendered by default.

shared/Minimal.props

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
<PropertyGroup Label="AvailableTargetFrameworks">
77
<LegacyTargetFramework>net472</LegacyTargetFramework>
88
<LegacyTargetFrameworkVersion>v4.7.2</LegacyTargetFrameworkVersion>
9-
<LibraryTargetFramework>netstandard2.0</LibraryTargetFramework>
109
<ApplicationTargetFramework>net8.0</ApplicationTargetFramework>
1110
<GeneratorTargetFramework>net472</GeneratorTargetFramework>
12-
<BeforeTargetFrameworkInferenceTargets>$(DnetSharedPath)/Runtime.targets</BeforeTargetFrameworkInferenceTargets> <!-- $(DnetSharedPath)/ prefix added to prevent build fail -->
1311
</PropertyGroup>
1412

1513
<PropertyGroup Label="MinimalProjectSettings">
@@ -21,6 +19,9 @@
2119
<LangVersion>latest</LangVersion>
2220
<Configurations>$(Configurations);Integration</Configurations>
2321
<DebugType>embedded</DebugType>
22+
<Deterministic>true</Deterministic>
23+
<EnableSourceLink>false</EnableSourceLink>
24+
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
2425
<AnalysisLevel>latest</AnalysisLevel>
2526
<NoWarn>$(NoWarn);CS1591</NoWarn>
2627
<WarningsAsErrors>$(WarningsAsErrors);CS8073;nullable</WarningsAsErrors>
@@ -29,13 +30,13 @@
2930
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
3031
<ShowMessageForImplicitlySkipAnalyzers>false</ShowMessageForImplicitlySkipAnalyzers>
3132
<Features>strict</Features>
32-
<GenerateDocumentationFile>false</GenerateDocumentationFile>
33-
<OptionalWarnings>CS1572;CS1573;CS1574;CS1711;CS1712;CS1734;CS1735;SA1107;SA1116;SA1117;SA1201;SA1202;SA1203;SA1214;SA1402</OptionalWarnings>
33+
<OptionalWarnings>CS1572;CS1573;CS1574;CS1711;CS1712;CS1734;CS1735;CA1513;SA1107;SA1116;SA1117;SA1201;SA1202;SA1203;SA1214;SA1402;SYSLIB1045</OptionalWarnings>
34+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
35+
<BeforeTargetFrameworkInferenceTargets>$(MSBuildThisFileDirectory)\Runtime.targets</BeforeTargetFrameworkInferenceTargets>
3436
</PropertyGroup>
3537

3638
<PropertyGroup Label="DevelopmentProjectSettings" Condition="'$(Configuration)' != 'Integration'">
3739
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
38-
<NoWarn>$(NoWarn);$(OptionalWarnings)</NoWarn>
3940
</PropertyGroup>
4041

4142
<PropertyGroup Label="ProductionProjectSettings" Condition="'$(Configuration)' != 'Debug'">
@@ -45,6 +46,7 @@
4546

4647
<PropertyGroup Label="IntegrationProjectSettings" Condition="'$(Configuration)' == 'Integration'">
4748
<Optimize>true</Optimize>
49+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
4850
</PropertyGroup>
4951

5052
<ItemGroup Label="MinimalAnalyzerFiles">
@@ -64,7 +66,7 @@
6466

6567
<ItemGroup Label="MinimalAnalyzerReferences">
6668
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" />
67-
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" PrivateAssets="All" />
69+
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="4.14.0" PrivateAssets="All" />
6870
<PackageReference Include="ErrorProne.NET.CoreAnalyzers" Version="0.7.0-beta.1" PrivateAssets="All" />
6971
<PackageReference Include="ErrorProne.NET.Structs" Version="0.6.1-beta.1" PrivateAssets="All" />
7072
</ItemGroup>

shared/MinimalTestLibrary.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
66
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
77
<IsPackable>false</IsPackable>
8-
<NoWarn>$(NoWarn);IDE0060;SA1131;SA1133;SA1201;SA1202;CA1002;CA1034;CA1054;CA1062;CA1308;CA1801;CA1815;CA1822;CA1825;CA1861;CA2007;CA2016;CA2234;CA5394;EPS05;EPS06</NoWarn>
8+
<NoWarn>$(NoWarn);CS0618;IDE0060;SA1131;SA1133;SA1201;SA1202;CA1002;CA1034;CA1054;CA1062;CA1308;CA1801;CA1815;CA1822;CA1825;CA1861;CA2007;CA2016;CA2234;CA5394;EPS05;EPS06</NoWarn>
99
<DefineConstants>$(DefineConstants);NULLABLE_ATTRIBUTES_DISABLE</DefineConstants>
1010
<IsPublishable>false</IsPublishable>
11+
<TieredCompilation>false</TieredCompilation>
1112
</PropertyGroup>
1213

1314
<ItemGroup Label="MinimalTestPackageReferences">
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
15-
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1" />
1617
</ItemGroup>
1718

1819
<ItemGroup Label="MinimalTestConfigFiles">

shared/Runtime.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<Project>
2-
<PropertyGroup Label="NetCoreProjectSettings" Condition="'$(TargetFramework)' == '$(ApplicationTargetFramework)'">
2+
<PropertyGroup Label="NetCoreProjectSettings" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp3.1'))">
33
<NoWarn>$(NoWarn);CA2007</NoWarn>
44
</PropertyGroup>
5+
6+
<PropertyGroup Label="ExeOutputSettings" Condition="'$(OutputType)' == 'Exe'">
7+
<PublishDocumentationFiles>false</PublishDocumentationFiles>
8+
<PublishReferencesDocumentationFiles>false</PublishReferencesDocumentationFiles>
9+
</PropertyGroup>
510
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"preEnumerateTheories": false,
33
"parallelizeTestCollections": false,
4+
"shadowCopy": false
45
}

0 commit comments

Comments
 (0)