diff --git a/Directory.Build.props b/Directory.Build.props index 4ea29042ac6..ae8784aa448 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -51,6 +51,10 @@ $(NoWarn.Replace(';1591', '')) + + moderate + + diff --git a/NuGet.config b/NuGet.config index 77b2bf048ad..67d465bc53f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,6 +4,7 @@ + @@ -18,6 +19,7 @@ + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8a47f80c44c..8505fdc64a8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,7 +82,6 @@ extends: os: windows timeoutInMinutes: 180 variables: - - _AdditionalBuildArgs: '' - _InternalBuildArgs: '' # Rely on task Arcade injects, not auto-injected build step. - skipComponentGovernanceDetection: true @@ -118,7 +117,7 @@ extends: env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs) $(_InternalRuntimeDownloadArgs) $(_AdditionalBuildArgs) + - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs) $(_InternalRuntimeDownloadArgs) env: Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl) displayName: Build diff --git a/benchmark/Directory.Build.props b/benchmark/Directory.Build.props index d92102a50e8..50d7466484d 100644 --- a/benchmark/Directory.Build.props +++ b/benchmark/Directory.Build.props @@ -3,10 +3,11 @@ $(MSBuildThisFileDirectory)..\rulesets\EFCore.test.ruleset + false - + diff --git a/benchmark/EFCore.Sqlite.Benchmarks/EFCore.Sqlite.Benchmarks.csproj b/benchmark/EFCore.Sqlite.Benchmarks/EFCore.Sqlite.Benchmarks.csproj index b693456dfed..d5f32914351 100644 --- a/benchmark/EFCore.Sqlite.Benchmarks/EFCore.Sqlite.Benchmarks.csproj +++ b/benchmark/EFCore.Sqlite.Benchmarks/EFCore.Sqlite.Benchmarks.csproj @@ -15,10 +15,6 @@ - - - - Always diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8c62948044b..a83970585ea 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -29,9 +29,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime dcf4a22cf8671c1abe880ebec4cfd906c99588bf - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 574100b692e71fa3426931adf4c1ba42e4ee5213 + 362ab6669d55a75d51166f01b596c967c734ef4c https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -45,32 +45,32 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime ef853a71052646a42abf17e888ec6d9a69614ad9 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 574100b692e71fa3426931adf4c1ba42e4ee5213 + 362ab6669d55a75d51166f01b596c967c734ef4c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 574100b692e71fa3426931adf4c1ba42e4ee5213 + 362ab6669d55a75d51166f01b596c967c734ef4c - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 574100b692e71fa3426931adf4c1ba42e4ee5213 + 362ab6669d55a75d51166f01b596c967c734ef4c - + https://github.com/dotnet/arcade - 3edea53c9b10e4bc63de863d71a05d47d9bb5b69 + 6544413e02741855b701468aa8afc6cf8ca62c72 - + https://github.com/dotnet/arcade - 3edea53c9b10e4bc63de863d71a05d47d9bb5b69 + 6544413e02741855b701468aa8afc6cf8ca62c72 - + https://github.com/dotnet/arcade - 3edea53c9b10e4bc63de863d71a05d47d9bb5b69 + 6544413e02741855b701468aa8afc6cf8ca62c72 diff --git a/eng/Versions.props b/eng/Versions.props index bb7f4256fa8..c30c7b46488 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -24,22 +24,22 @@ 8.0.1 8.0.1 8.0.2 - 8.0.20-servicing.25419.14 + 8.0.21-servicing.25475.13 8.0.1 8.0.6 8.0.2 - 8.0.20 - 8.0.20 - 8.0.20-servicing.25419.14 + 8.0.21 + 8.0.21 + 8.0.21-servicing.25475.13 - 8.0.0-beta.25504.1 + 8.0.0-beta.25515.1 4.5.0 - 1.1.2-beta1.24121.1 - 1.11.3 + 1.1.2 + 1.17.0 1.3.2 diff --git a/global.json b/global.json index 5446e45cba8..b64fdb8925f 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "8.0.120", + "version": "8.0.121", "allowPrerelease": true, "rollForward": "latestMajor" }, "tools": { - "dotnet": "8.0.120", + "dotnet": "8.0.121", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" @@ -13,7 +13,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25504.1", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25504.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25515.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25515.1" } } diff --git a/src/EFCore.Cosmos/EFCore.Cosmos.csproj b/src/EFCore.Cosmos/EFCore.Cosmos.csproj index d4fb7ac9c87..1ab030399bd 100644 --- a/src/EFCore.Cosmos/EFCore.Cosmos.csproj +++ b/src/EFCore.Cosmos/EFCore.Cosmos.csproj @@ -45,7 +45,7 @@ - + diff --git a/src/EFCore.Proxies/EFCore.Proxies.csproj b/src/EFCore.Proxies/EFCore.Proxies.csproj index 310779f2196..8e54b90f209 100644 --- a/src/EFCore.Proxies/EFCore.Proxies.csproj +++ b/src/EFCore.Proxies/EFCore.Proxies.csproj @@ -39,7 +39,7 @@ - + diff --git a/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs b/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs index ec096a7471b..c408d8fb795 100644 --- a/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs +++ b/src/EFCore.Proxies/Proxies/Internal/LazyLoadingInterceptor.cs @@ -53,7 +53,7 @@ public virtual void Intercept(IInvocation invocation) } else if (LazyLoaderSetter.Equals(invocation.Method)) { - _loader = (ILazyLoader)invocation.Arguments[0]; + _loader = (ILazyLoader)invocation.Arguments[0]!; } else { diff --git a/src/EFCore.Proxies/Proxies/Internal/PropertyChangeInterceptorBase.cs b/src/EFCore.Proxies/Proxies/Internal/PropertyChangeInterceptorBase.cs index 404c7c53d13..7b103ea7dfa 100644 --- a/src/EFCore.Proxies/Proxies/Internal/PropertyChangeInterceptorBase.cs +++ b/src/EFCore.Proxies/Proxies/Internal/PropertyChangeInterceptorBase.cs @@ -60,7 +60,7 @@ protected virtual string FindPropertyName(IInvocation invocation) if (indexerPropertyInfo != null && indexerPropertyInfo.GetSetMethod(nonPublic: true) == invocation.Method) { - return (string)invocation.Arguments[0]; + return (string)invocation.Arguments[0]!; } } diff --git a/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs b/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs index 2637f9e07c8..2c344882b99 100644 --- a/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs +++ b/src/EFCore.Proxies/Proxies/Internal/PropertyChangedInterceptor.cs @@ -50,12 +50,12 @@ public virtual void Intercept(IInvocation invocation) if (methodName == $"add_{nameof(INotifyPropertyChanged.PropertyChanged)}") { _handler = (PropertyChangedEventHandler)Delegate.Combine( - _handler, (Delegate)invocation.Arguments[0]); + _handler, (Delegate)invocation.Arguments[0]!); } else if (methodName == $"remove_{nameof(INotifyPropertyChanged.PropertyChanged)}") { _handler = (PropertyChangedEventHandler?)Delegate.Remove( - _handler, (Delegate)invocation.Arguments[0]); + _handler, (Delegate)invocation.Arguments[0]!); } } else if (methodName.StartsWith("set_", StringComparison.Ordinal)) diff --git a/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs b/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs index ed1cfe38e51..ae443bce73b 100644 --- a/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs +++ b/src/EFCore.Proxies/Proxies/Internal/PropertyChangingInterceptor.cs @@ -50,12 +50,12 @@ public virtual void Intercept(IInvocation invocation) if (methodName == $"add_{nameof(INotifyPropertyChanging.PropertyChanging)}") { _handler = (PropertyChangingEventHandler)Delegate.Combine( - _handler, (Delegate)invocation.Arguments[0]); + _handler, (Delegate)invocation.Arguments[0]!); } else if (methodName == $"remove_{nameof(INotifyPropertyChanging.PropertyChanging)}") { _handler = (PropertyChangingEventHandler?)Delegate.Remove( - _handler, (Delegate)invocation.Arguments[0]); + _handler, (Delegate)invocation.Arguments[0]!); } } else if (methodName.StartsWith("set_", StringComparison.Ordinal)) diff --git a/src/EFCore.SqlServer/EFCore.SqlServer.csproj b/src/EFCore.SqlServer/EFCore.SqlServer.csproj index 17979be03a4..f013d3d8066 100644 --- a/src/EFCore.SqlServer/EFCore.SqlServer.csproj +++ b/src/EFCore.SqlServer/EFCore.SqlServer.csproj @@ -48,7 +48,7 @@ - + diff --git a/src/ef/ef.csproj b/src/ef/ef.csproj index 0bc0ba69b04..eb5a22c8afa 100644 --- a/src/ef/ef.csproj +++ b/src/ef/ef.csproj @@ -27,6 +27,11 @@ + + + + + TextTemplatingFilePreprocessor diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 9ccfadee78d..cfd767dcf83 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -5,6 +5,7 @@ $(NoWarn);CA1707;1591;xUnit1000;xUnit1003;xUnit1004;xUnit1010;xUnit1013;xUnit1026;xUnit2013;xUnit1024 $(MSBuildThisFileDirectory)..\rulesets\EFCore.test.ruleset preview + false diff --git a/test/EFCore.Analyzers.Tests/Utilities/CSharpAnalyzerVerifier.cs b/test/EFCore.Analyzers.Tests/Utilities/CSharpAnalyzerVerifier.cs index 98a607c35f9..d77ede4fb9c 100644 --- a/test/EFCore.Analyzers.Tests/Utilities/CSharpAnalyzerVerifier.cs +++ b/test/EFCore.Analyzers.Tests/Utilities/CSharpAnalyzerVerifier.cs @@ -18,7 +18,9 @@ public static class CSharpAnalyzerVerifier where TAnalyzer : DiagnosticAnalyzer, new() { public static DiagnosticResult Diagnostic(string diagnosticId) +#pragma warning disable CS0618 // Type or member is obsolete => CSharpAnalyzerVerifier.Diagnostic(diagnosticId); +#pragma warning restore CS0618 // Type or member is obsolete public static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) { @@ -27,7 +29,9 @@ public static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] return test.RunAsync(); } +#pragma warning disable CS0618 // Type or member is obsolete public class Test : CSharpAnalyzerTest +#pragma warning restore CS0618 // Type or member is obsolete { protected override CompilationOptions CreateCompilationOptions() { diff --git a/test/EFCore.Analyzers.Tests/Utilities/CSharpCodeFixVerifier.cs b/test/EFCore.Analyzers.Tests/Utilities/CSharpCodeFixVerifier.cs index b7269003885..dd846979c7a 100644 --- a/test/EFCore.Analyzers.Tests/Utilities/CSharpCodeFixVerifier.cs +++ b/test/EFCore.Analyzers.Tests/Utilities/CSharpCodeFixVerifier.cs @@ -18,7 +18,9 @@ public static class CSharpCodeFixVerifier where TCodeFix : CodeFixProvider, new() { public static DiagnosticResult Diagnostic(string diagnosticId) +#pragma warning disable CS0618 // Type or member is obsolete => CSharpAnalyzerVerifier.Diagnostic(diagnosticId); +#pragma warning restore CS0618 // Type or member is obsolete public static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) { @@ -34,7 +36,9 @@ public static async Task VerifyCodeFixAsync(string source, string fixedSource) await test.RunAsync(); } +#pragma warning disable CS0618 // Type or member is obsolete public class Test : CSharpCodeFixTest +#pragma warning restore CS0618 // Type or member is obsolete { protected override async Task CreateProjectImplAsync( EvaluatedProjectState primaryProject, diff --git a/test/EFCore.AspNet.Specification.Tests/EFCore.AspNet.Specification.Tests.csproj b/test/EFCore.AspNet.Specification.Tests/EFCore.AspNet.Specification.Tests.csproj index 1b2bc0c6509..ef00b98af59 100644 --- a/test/EFCore.AspNet.Specification.Tests/EFCore.AspNet.Specification.Tests.csproj +++ b/test/EFCore.AspNet.Specification.Tests/EFCore.AspNet.Specification.Tests.csproj @@ -48,9 +48,9 @@ - + - + diff --git a/test/EFCore.OData.FunctionalTests/EFCore.OData.FunctionalTests.csproj b/test/EFCore.OData.FunctionalTests/EFCore.OData.FunctionalTests.csproj index 1c6161f1e2d..ee62ac44d44 100644 --- a/test/EFCore.OData.FunctionalTests/EFCore.OData.FunctionalTests.csproj +++ b/test/EFCore.OData.FunctionalTests/EFCore.OData.FunctionalTests.csproj @@ -41,7 +41,7 @@ - + diff --git a/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs b/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs index cb9f1684db1..a99bfd5f411 100644 --- a/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs +++ b/test/EFCore.Specification.Tests/CustomConvertersTestBase.cs @@ -1216,8 +1216,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con b.Property(e => e.ByteArray5) .HasConversion( new ValueConverter( - v => v.Reverse().Concat(new byte[] { 4, 20 }).ToArray(), - v => v.Reverse().Skip(2).ToArray()), + v => ((IEnumerable)v).Reverse().Concat(new byte[] { 4, 20 }).ToArray(), + v => ((IEnumerable)v).Reverse().Skip(2).ToArray()), bytesComparer) .HasMaxLength(7); diff --git a/test/EFCore.Specification.Tests/EFCore.Specification.Tests.csproj b/test/EFCore.Specification.Tests/EFCore.Specification.Tests.csproj index 291c1d3344e..cc5d471b354 100644 --- a/test/EFCore.Specification.Tests/EFCore.Specification.Tests.csproj +++ b/test/EFCore.Specification.Tests/EFCore.Specification.Tests.csproj @@ -54,7 +54,7 @@ - + diff --git a/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs index 3dd52a5f7c6..994eb9062eb 100644 --- a/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NorthwindMiscellaneousQueryTestBase.cs @@ -5696,7 +5696,7 @@ public virtual Task Contains_over_concatenated_parameter_and_constant(bool async return AssertQuery( async, - ss => ss.Set().Where(c => data.Contains(someVariable + "SomeConstant"))); + ss => ss.Set().Where(c => ((IEnumerable)data).Contains(someVariable + "SomeConstant"))); } [ConditionalTheory] diff --git a/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs index 82f8ce725ad..865f5dc026e 100644 --- a/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs @@ -586,7 +586,7 @@ public virtual Task Parameter_collection_Concat_column_collection(bool async) return AssertQuery( async, - ss => ss.Set().Where(c => ints.Concat(c.Ints).Count() == 2)); + ss => ss.Set().Where(c => ((IEnumerable)ints).Concat(c.Ints).Count() == 2)); } [ConditionalTheory] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/PrimitiveCollectionsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/PrimitiveCollectionsQuerySqlServerTest.cs index 81211150f9b..837646b257c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/PrimitiveCollectionsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/PrimitiveCollectionsQuerySqlServerTest.cs @@ -974,18 +974,18 @@ public override async Task Parameter_collection_Concat_column_collection(bool as AssertSql( """ -@__ints_0='[11,111]' (Size = 4000) +@__p_0='[11,111]' (Size = 4000) SELECT [p].[Id], [p].[Bool], [p].[Bools], [p].[DateTime], [p].[DateTimes], [p].[Enum], [p].[Enums], [p].[Int], [p].[Ints], [p].[NullableInt], [p].[NullableInts], [p].[NullableString], [p].[NullableStrings], [p].[String], [p].[Strings] FROM [PrimitiveCollectionsEntity] AS [p] WHERE ( SELECT COUNT(*) FROM ( - SELECT [i].[value] - FROM OPENJSON(@__ints_0) WITH ([value] int '$') AS [i] + SELECT [p0].[value] + FROM OPENJSON(@__p_0) WITH ([value] int '$') AS [p0] UNION ALL - SELECT [i0].[value] - FROM OPENJSON([p].[Ints]) WITH ([value] int '$') AS [i0] + SELECT [i].[value] + FROM OPENJSON([p].[Ints]) WITH ([value] int '$') AS [i] ) AS [t]) = 2 """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/PrimitiveCollectionsQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/PrimitiveCollectionsQuerySqliteTest.cs index 301d7906cc0..9faa7597b62 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/PrimitiveCollectionsQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/PrimitiveCollectionsQuerySqliteTest.cs @@ -957,18 +957,18 @@ public override async Task Parameter_collection_Concat_column_collection(bool as AssertSql( """ -@__ints_0='[11,111]' (Size = 8) +@__p_0='[11,111]' (Size = 8) SELECT "p"."Id", "p"."Bool", "p"."Bools", "p"."DateTime", "p"."DateTimes", "p"."Enum", "p"."Enums", "p"."Int", "p"."Ints", "p"."NullableInt", "p"."NullableInts", "p"."NullableString", "p"."NullableStrings", "p"."String", "p"."Strings" FROM "PrimitiveCollectionsEntity" AS "p" WHERE ( SELECT COUNT(*) FROM ( - SELECT "i"."value" - FROM json_each(@__ints_0) AS "i" + SELECT "p0"."value" + FROM json_each(@__p_0) AS "p0" UNION ALL - SELECT "i0"."value" - FROM json_each("p"."Ints") AS "i0" + SELECT "i"."value" + FROM json_each("p"."Ints") AS "i" ) AS "t") = 2 """); }