diff --git a/eng/targets/CSharp.Common.targets b/eng/targets/CSharp.Common.targets index a0f01345e619b39838a40eac4e88b10d531057e0..18757af70ae97745c1a2af37a83086ba2cce15ac 100644 --- a/eng/targets/CSharp.Common.targets +++ b/eng/targets/CSharp.Common.targets @@ -16,16 +16,14 @@ <!-- Public members should not use oblivious types. Not done with all nullable annotations. --> <NoWarn>$(NoWarn);RS0041</NoWarn> - <Nullable Condition=" '$(Nullable)' == '' AND ( - '$(IsImplementationProject)' == 'true' OR + <_IsSrcProject Condition="'$(IsImplementationProject)' == 'true' OR '$(IsAnalyzersProject)' == true OR - '$(IsSpecificationTestProject)' == 'true') ">enable</Nullable> + '$(IsSpecificationTestProject)' == 'true'">true</_IsSrcProject> + + <Nullable Condition=" '$(Nullable)' == '' AND '$(_IsSrcProject)' == 'true'">enable</Nullable> <!-- Strip out non-public nullable annotations for src projects. This should help with size reduction --> - <Features Condition=" - '$(IsImplementationProject)' == 'true' OR - '$(IsAnalyzersProject)' == true OR - '$(IsSpecificationTestProject)' == 'true'">$(Features);nullablePublicOnly</Features> + <Features Condition="'$(_IsSrcProject)' == 'true'">$(Features);nullablePublicOnly</Features> <!-- Turn off platform compatibility analyzer warnings in test, test assets, and samples. --> <NoWarn Condition=" '$(IsTestProject)' == 'true' OR @@ -41,6 +39,19 @@ <EnforceCodeStyleInBuild Condition="'$(EnforceCodeStyleInBuild)' == ''">true</EnforceCodeStyleInBuild> </PropertyGroup> + <!-- Enable implicit usings for projects that target the default TFM --> + <PropertyGroup Condition="'$(ImplicitUsings)' == '' AND '$(TargetFrameworks)' == '' AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"> + <ImplicitUsings>enable</ImplicitUsings> + </PropertyGroup> + + <ItemGroup Condition="'$(ImplicitUsings)' == 'enable'"> + <!-- We should make it obvious when Linq is being used in shipping code --> + <Using Remove="System.Linq" Condition="'$(_IsSrcProject)' == 'true'" /> + <!-- System.Net.Http types will frequently conflict with ASP.NET Core types--> + <Using Remove="System.Net.Http" /> + <Using Include="Xunit" Condition="'$(IsTestProject)' == 'true' OR '$(IsUnitTestProject)' == 'true'" /> + </ItemGroup> + <ItemGroup Condition=" '$(DotNetBuildFromSource)' != 'true' AND $(AddPublicApiAnalyzers) "> <Reference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" ExcludeAssets="Compile" PrivateAssets="All" /> </ItemGroup> diff --git a/eng/tools/Directory.Build.props b/eng/tools/Directory.Build.props index 117dcdc8deab4830325c7e6687d7637821e2ec4e..169cff2c21d8e609809e39f2e8ae3122f3afee2e 100644 --- a/eng/tools/Directory.Build.props +++ b/eng/tools/Directory.Build.props @@ -5,6 +5,5 @@ <IsPackable>false</IsPackable> <DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions> <Nullable>disable</Nullable> - <DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports> </PropertyGroup> </Project> diff --git a/eng/tools/RepoTasks/CreateFrameworkListFile.cs b/eng/tools/RepoTasks/CreateFrameworkListFile.cs index c2097f64d154122b6f2bb962919a1b08816bf934..5772283fa6c13af9df6d48ac092261f296b0efe3 100644 --- a/eng/tools/RepoTasks/CreateFrameworkListFile.cs +++ b/eng/tools/RepoTasks/CreateFrameworkListFile.cs @@ -12,7 +12,7 @@ using Microsoft.Build.Utilities; namespace RepoTasks { - public class CreateFrameworkListFile : Task + public class CreateFrameworkListFile : Microsoft.Build.Utilities.Task { /// <summary> /// Files to extract basic information from and include in the list. diff --git a/eng/tools/RepoTasks/GenerateGuid.cs b/eng/tools/RepoTasks/GenerateGuid.cs index 3309e6450cffaa707b546fffa8d7b1722060e74e..9e5985d1a1ba8aeaf3300e8ff79a5ce74ce1353c 100644 --- a/eng/tools/RepoTasks/GenerateGuid.cs +++ b/eng/tools/RepoTasks/GenerateGuid.cs @@ -8,7 +8,7 @@ using Microsoft.Build.Utilities; namespace RepoTasks { - public class GenerateGuid : Task + public class GenerateGuid : Microsoft.Build.Utilities.Task { [Output] public string Guid { get; private set; } diff --git a/eng/tools/RepoTasks/GenerateSharedFrameworkDepsFile.cs b/eng/tools/RepoTasks/GenerateSharedFrameworkDepsFile.cs index 726107c7dc0df4cc15f1bc6238faf53480e59020..85ed7da0382294433849c95debd83e4c1d8fbf71 100644 --- a/eng/tools/RepoTasks/GenerateSharedFrameworkDepsFile.cs +++ b/eng/tools/RepoTasks/GenerateSharedFrameworkDepsFile.cs @@ -14,7 +14,7 @@ using Microsoft.Extensions.DependencyModel; namespace RepoTasks { - public class GenerateSharedFrameworkDepsFile : Task + public class GenerateSharedFrameworkDepsFile : Microsoft.Build.Utilities.Task { [Required] public string DepsFilePath { get; set; } diff --git a/eng/tools/RepoTasks/GetMsiProperty.cs b/eng/tools/RepoTasks/GetMsiProperty.cs index 9b60198651cd2c5b6ed58af231836def73acd33d..7f7be6df576ea762499fa9210ba2a09fecba2f37 100644 --- a/eng/tools/RepoTasks/GetMsiProperty.cs +++ b/eng/tools/RepoTasks/GetMsiProperty.cs @@ -9,7 +9,7 @@ using Microsoft.Deployment.WindowsInstaller.Package; namespace RepoTasks { - public class GetMsiProperty : Task + public class GetMsiProperty : Microsoft.Build.Utilities.Task { [Required] public string InstallPackage { get; set; } diff --git a/eng/tools/RepoTasks/RemoveSharedFrameworkDependencies.cs b/eng/tools/RepoTasks/RemoveSharedFrameworkDependencies.cs index 7eb6e8408f2176e8e6d6c6fb1000bc858c0ff039..07d0e42cc3d9b98f371f1611297e21a1264ce1af 100644 --- a/eng/tools/RepoTasks/RemoveSharedFrameworkDependencies.cs +++ b/eng/tools/RepoTasks/RemoveSharedFrameworkDependencies.cs @@ -17,7 +17,7 @@ using NuGet.Packaging.Core; namespace RepoTasks { // This is temporary until we can use FrameworkReference to build our own packages - public class RemoveSharedFrameworkDependencies : Task + public class RemoveSharedFrameworkDependencies : Microsoft.Build.Utilities.Task { [Required] public ITaskItem[] Files { get; set; } diff --git a/global.json b/global.json index e1e3566ac2acc2337d77f466a03d54d4c4fc1787..0e2d8628d39ae427dcb18ee90ca79a66b2bd590f 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "6.0.100-rc.1.21401.2" + "version": "6.0.100-rc.1.21413.1" }, "tools": { - "dotnet": "6.0.100-rc.1.21401.2", + "dotnet": "6.0.100-rc.1.21413.1", "runtimes": { "dotnet/x64": [ "2.1.27", diff --git a/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.WarningSuppressions.xml b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.WarningSuppressions.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee75d0f3174979c29ea09d99cde40bbe79e15422 --- /dev/null +++ b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.WarningSuppressions.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<linker> + <assembly fullname="Microsoft.AspNetCore.Components.Authorization, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"> + <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> + <argument>ILLink</argument> + <argument>IL2110</argument> + <property name="Scope">member</property> + <property name="Target">M:Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView.RenderContentInDefaultLayout(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder,Microsoft.AspNetCore.Components.RenderFragment)</property> + </attribute> + <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> + <argument>ILLink</argument> + <argument>IL2111</argument> + <property name="Scope">member</property> + <property name="Target">M:Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView.RenderContentInDefaultLayout(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder,Microsoft.AspNetCore.Components.RenderFragment)</property> + </attribute> + </assembly> +</linker> \ No newline at end of file diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml b/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml index cc79f6d37717f64a40a49f846dd0565efeda16ae..ccde9a2ffa2481ffbe6965065dbbe92000f4519c 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.WarningSuppressions.xml @@ -73,5 +73,17 @@ <property name="Scope">member</property> <property name="Target">M:Microsoft.AspNetCore.Components.Reflection.MemberAssignment.<GetPropertiesIncludingInherited>d__0.MoveNext</property> </attribute> + <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> + <argument>ILLink</argument> + <argument>IL2110</argument> + <property name="Scope">member</property> + <property name="Target">M:Microsoft.AspNetCore.Components.RouteView.Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder)</property> + </attribute> + <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> + <argument>ILLink</argument> + <argument>IL2111</argument> + <property name="Scope">member</property> + <property name="Target">M:Microsoft.AspNetCore.Components.RouteView.Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder)</property> + </attribute> </assembly> </linker> \ No newline at end of file diff --git a/src/Components/Components/src/NavigationManagerExtensions.cs b/src/Components/Components/src/NavigationManagerExtensions.cs index 87430b0fa516abafc61cffbc092aad8ff5aa398a..f7daa2a52c074dab35b76ad020dadb5f20328ff7 100644 --- a/src/Components/Components/src/NavigationManagerExtensions.cs +++ b/src/Components/Components/src/NavigationManagerExtensions.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Globalization; +using System.Linq; using System.Text; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Internal; diff --git a/src/Components/Server/src/Circuits/RemoteRenderer.cs b/src/Components/Server/src/Circuits/RemoteRenderer.cs index a94887a7c202b9a49b4eb4bde4bd76ed6b5b29eb..21f8957d383ee195db704ea21e4cce29df4d80fa 100644 --- a/src/Components/Server/src/Circuits/RemoteRenderer.cs +++ b/src/Components/Server/src/Circuits/RemoteRenderer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Concurrent; +using System.Linq; using System.Text.Json; using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.Web; diff --git a/src/Components/Server/src/Circuits/ServerComponentDeserializer.cs b/src/Components/Server/src/Circuits/ServerComponentDeserializer.cs index ddfd95abad93b274e2b1ee7a2f8d70367b1d3b6a..0043cbb6b11ba6f7790647468f54ef22c7498b31 100644 --- a/src/Components/Server/src/Circuits/ServerComponentDeserializer.cs +++ b/src/Components/Server/src/Circuits/ServerComponentDeserializer.cs @@ -226,7 +226,7 @@ namespace Microsoft.AspNetCore.Components.Server LoggerMessage.Define<string>( LogLevel.Debug, new EventId(4, "InvalidMarkerType"), - "Invalid component marker type '{}'."); + "Invalid component marker type '{MarkerType}'."); private static readonly Action<ILogger, Exception> _missingMarkerDescriptor = LoggerMessage.Define( diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js index c2e715b03018a8e2a40df354ca0d65c6acf35da8..c09fced56bd940af437ddc21d82efdbfb09fdc67 100644 Binary files a/src/Components/Web.JS/dist/Release/blazor.server.js and b/src/Components/Web.JS/dist/Release/blazor.server.js differ diff --git a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.WarningSuppressions.xml b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.WarningSuppressions.xml index 7594fdc3302b55b4e8d6831fff09b4c0d12b2c99..db0f1efbb1b10d0b1afe79ff17fb7f5aaeb722b8 100644 --- a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.WarningSuppressions.xml +++ b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.WarningSuppressions.xml @@ -5,7 +5,13 @@ <argument>ILLink</argument> <argument>IL2026</argument> <property name="Scope">member</property> - <property name="Target">M:Microsoft.AspNetCore.Components.Web.Infrastructure.JSComponentInterop.SetRootComponentParameters(System.Int32,System.Int32,System.Byte[])</property> + <property name="Target">M:Microsoft.AspNetCore.Components.Web.Infrastructure.JSComponentInterop.SetRootComponentParameters(System.Int32,System.Int32,System.Text.Json.JsonElement,System.Text.Json.JsonSerializerOptions)</property> + </attribute> + <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> + <argument>ILLink</argument> + <argument>IL2026</argument> + <property name="Scope">member</property> + <property name="Target">M:Microsoft.AspNetCore.Components.Web.WebEventData.ParseEventArgsJson(Microsoft.AspNetCore.Components.RenderTree.Renderer,System.Text.Json.JsonSerializerOptions,System.UInt64,System.String,System.Text.Json.JsonElement)</property> </attribute> <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> <argument>ILLink</argument> @@ -13,6 +19,12 @@ <property name="Scope">member</property> <property name="Target">M:Microsoft.AspNetCore.Components.Web.Infrastructure.JSComponentInterop.AddRootComponent(System.String,System.String)</property> </attribute> + <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> + <argument>ILLink</argument> + <argument>IL2067</argument> + <property name="Scope">member</property> + <property name="Target">M:Microsoft.AspNetCore.Components.Web.Infrastructure.JSComponentInterop.CreateEventCallbackWithSingleParameter(System.Type,Microsoft.JSInterop.IJSObjectReference)</property> + </attribute> <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> <argument>ILLink</argument> <argument>IL2067</argument> diff --git a/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.WarningSuppressions.xml b/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.WarningSuppressions.xml index 1159dd659674e89b9f7dc8b5a775b114adafc1cc..b394263f6173abfd8a7e91f455d3abe02b257505 100644 --- a/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.WarningSuppressions.xml +++ b/src/Components/WebAssembly/WebAssembly/src/Microsoft.AspNetCore.Components.WebAssembly.WarningSuppressions.xml @@ -17,25 +17,25 @@ <argument>ILLink</argument> <argument>IL2026</argument> <property name="Scope">member</property> - <property name="Target">M:Microsoft.AspNetCore.Components.Web.WebEventData.ParseEventArgsJson(Microsoft.AspNetCore.Components.RenderTree.Renderer,System.Text.Json.JsonSerializerOptions,System.UInt64,System.String,System.Text.Json.JsonElement)</property> + <property name="Target">M:Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder.InitializeRegisteredRootComponents(Microsoft.JSInterop.IJSUnmarshalledRuntime)</property> </attribute> <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> <argument>ILLink</argument> <argument>IL2026</argument> <property name="Scope">member</property> - <property name="Target">M:Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder.InitializeRegisteredRootComponents(Microsoft.JSInterop.IJSUnmarshalledRuntime)</property> + <property name="Target">M:Microsoft.AspNetCore.Components.WebAssemblyComponentParameterDeserializer.DeserializeParameters(System.Collections.Generic.IList{Microsoft.AspNetCore.Components.ComponentParameter},System.Collections.Generic.IList{System.Object})</property> </attribute> <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> <argument>ILLink</argument> <argument>IL2026</argument> <property name="Scope">member</property> - <property name="Target">M:Microsoft.AspNetCore.Components.WebAssemblyComponentParameterDeserializer.DeserializeParameters(System.Collections.Generic.IList{Microsoft.AspNetCore.Components.ComponentParameter},System.Collections.Generic.IList{System.Object})</property> + <property name="Target">M:Microsoft.Extensions.HotReload.HotReloadAgent.<TopologicalSort>g__Visit|10_0(System.Reflection.Assembly[],System.Reflection.Assembly,System.Collections.Generic.List{System.Reflection.Assembly},System.Collections.Generic.HashSet{System.String})</property> </attribute> <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> <argument>ILLink</argument> <argument>IL2026</argument> <property name="Scope">member</property> - <property name="Target">M:Microsoft.Extensions.HotReload.HotReloadAgent.<TopologicalSort>g__Visit|10_0(System.Reflection.Assembly[],System.Reflection.Assembly,System.Collections.Generic.List{System.Reflection.Assembly},System.Collections.Generic.HashSet{System.String})</property> + <property name="Target">M:Microsoft.Extensions.HotReload.HotReloadAgent.GetMetadataUpdateTypes(System.Collections.Generic.IReadOnlyList{Microsoft.Extensions.HotReload.UpdateDelta})</property> </attribute> <attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> <argument>ILLink</argument> diff --git a/src/Components/WebAssembly/WebAssembly/test/PullFromJSDataStreamTest.cs b/src/Components/WebAssembly/WebAssembly/test/PullFromJSDataStreamTest.cs index 72a5141062eb0a3667fb5977aa1acde6f1225199..9be1b2202f016a9fd2721ef30a728d8aab5bba04 100644 --- a/src/Components/WebAssembly/WebAssembly/test/PullFromJSDataStreamTest.cs +++ b/src/Components/WebAssembly/WebAssembly/test/PullFromJSDataStreamTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; +using System.Linq; using Microsoft.AspNetCore.Testing; using Microsoft.JSInterop; using Moq; diff --git a/src/Components/WebView/Samples/PhotinoPlatform/src/BlazorWindowRootComponents.cs b/src/Components/WebView/Samples/PhotinoPlatform/src/BlazorWindowRootComponents.cs index 1f4d420f5e84868281f85b518ccfbca6e8052a7d..4560337018a7fd8cc7c2027cfa6d5cd4d6be70c6 100644 --- a/src/Components/WebView/Samples/PhotinoPlatform/src/BlazorWindowRootComponents.cs +++ b/src/Components/WebView/Samples/PhotinoPlatform/src/BlazorWindowRootComponents.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using Microsoft.AspNetCore.Components.Web; namespace Microsoft.AspNetCore.Components.WebView.Photino diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs index 27e3be83220d8984a4243f74ececdd8cf1f2e234..07f6614a601c7cc79c646346a8bab9882f718e3b 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs @@ -71,7 +71,7 @@ namespace Wasm.Performance.Driver options.AddArgument("--enable-precise-memory-info"); } - options.SetLoggingPreference(LogType.Browser, LogLevel.All); + options.SetLoggingPreference(LogType.Browser, OpenQA.Selenium.LogLevel.All); var attempt = 0; const int MaxAttempts = 3; diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj index 2ad41a63c63361707a25a70ae5ecb830b643acff..346ddc48f16b5d1244f42ee4acb76c25730858ac 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj @@ -9,7 +9,6 @@ <SignAssembly>false</SignAssembly> <IsTestAssetProject>true</IsTestAssetProject> <RuntimeIdentifier>linux-x64</RuntimeIdentifier> - <DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports> </PropertyGroup> <ItemGroup> diff --git a/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs index f66890396a5ee1ab33b512e22d769aed70cfde14..f5961126c68d48696e191e8dcfc218f60c0b66b3 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net; +using System.Net.Http; using System.Net.Http.Json; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; diff --git a/src/Hosting/Hosting/src/StaticWebAssets/StaticWebAssetsFileProvider.cs b/src/Hosting/Hosting/src/StaticWebAssets/StaticWebAssetsFileProvider.cs index 645fc67a794b6c08f3244135b676738d28860cb2..fd8b8cffa5890c6f878ccf07df5fac93d3c60f28 100644 --- a/src/Hosting/Hosting/src/StaticWebAssets/StaticWebAssetsFileProvider.cs +++ b/src/Hosting/Hosting/src/StaticWebAssets/StaticWebAssetsFileProvider.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; using Microsoft.AspNetCore.Http; diff --git a/src/Http/Http.Extensions/src/RequestDelegateFactory.cs b/src/Http/Http.Extensions/src/RequestDelegateFactory.cs index 41f8101881526c3671afa747e5714d614e7f305f..37bd825b4b4ee87917cc929844dfe3be3c80aad2 100644 --- a/src/Http/Http.Extensions/src/RequestDelegateFactory.cs +++ b/src/Http/Http.Extensions/src/RequestDelegateFactory.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Security.Claims; diff --git a/src/Identity/UI/src/Areas/Identity/Filters/ExternalLoginsPageFilter.cs b/src/Identity/UI/src/Areas/Identity/Filters/ExternalLoginsPageFilter.cs index 978f553bb07fee1b9d39e750413781676d7f2910..c46969ed38fef9f02cdf53a21431364548658964 100644 --- a/src/Identity/UI/src/Areas/Identity/Filters/ExternalLoginsPageFilter.cs +++ b/src/Identity/UI/src/Areas/Identity/Filters/ExternalLoginsPageFilter.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Linq; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs b/src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs index 2ba28de7dea949575ff0ba0b6f9c58ac2b387dde..b4a5fe9696942a072dc9a89e8ca3d62dba4a964d 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/src/DiagnosticsEntityFrameworkCoreLoggerExtensions.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore diff --git a/src/Mvc/Mvc.Core/src/Infrastructure/ConfigureCompatibilityOptions.cs b/src/Mvc/Mvc.Core/src/Infrastructure/ConfigureCompatibilityOptions.cs index cbf1252d52b92d3c0c2169f80b608aa83c52279e..ce0ea19de6ed5978f74e7356949bdc0819df7179 100644 --- a/src/Mvc/Mvc.Core/src/Infrastructure/ConfigureCompatibilityOptions.cs +++ b/src/Mvc/Mvc.Core/src/Infrastructure/ConfigureCompatibilityOptions.cs @@ -91,8 +91,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure "Compatibility switch {SwitchName} in type {OptionsType} is using default value {Value}", @switch.Name, typeof(TOptions).Name, - @switch.Value, - Version); + @switch.Value); return; } diff --git a/src/Mvc/Mvc.Razor/src/ApplicationParts/RazorCompiledItemFeatureProvider.cs b/src/Mvc/Mvc.Razor/src/ApplicationParts/RazorCompiledItemFeatureProvider.cs index 7430a690b291e73cb4fd4546cd452a4124eddcef..adeb403eb85a3fe5e64a27f42cd094ab1fca5b1d 100644 --- a/src/Mvc/Mvc.Razor/src/ApplicationParts/RazorCompiledItemFeatureProvider.cs +++ b/src/Mvc/Mvc.Razor/src/ApplicationParts/RazorCompiledItemFeatureProvider.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Razor.Hosting; diff --git a/src/Mvc/Mvc.Razor/src/RazorHotReload.cs b/src/Mvc/Mvc.Razor/src/RazorHotReload.cs index 7afe446d598faa97bb67fe318b7ae476a53d6418..6efeb0ac5d729b11f6b70ab3902ddd40ccc4f2ea 100644 --- a/src/Mvc/Mvc.Razor/src/RazorHotReload.cs +++ b/src/Mvc/Mvc.Razor/src/RazorHotReload.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Linq; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.AspNetCore.Mvc.Razor.Compilation; using Microsoft.AspNetCore.Mvc.Razor.TagHelpers; diff --git a/src/Servers/HttpSys/test/FunctionalTests/Http3Tests.cs b/src/Servers/HttpSys/test/FunctionalTests/Http3Tests.cs index 79f7c2e38869bb16e5f6a03b52603f5739feee6b..69051dd32ff07cb13096be432b98166766d051a3 100644 --- a/src/Servers/HttpSys/test/FunctionalTests/Http3Tests.cs +++ b/src/Servers/HttpSys/test/FunctionalTests/Http3Tests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Net; +using System.Net.Http; using System.Net.Quic; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj b/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj index 83f17ad5b8ff835b9b1d4b48ceb100e75b607913..4871a525d7ec82497dce7c3942e19794ac750508 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj +++ b/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj @@ -8,7 +8,7 @@ <TestAssetOutputName>InProcessNewShimWebSite</TestAssetOutputName> <DefineConstants>FORWARDCOMPAT</DefineConstants> <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies> - <DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports> + <ImplicitUsings>disable</ImplicitUsings> </PropertyGroup> <ItemGroup Condition="'$(OS)' == 'Windows_NT'"> diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TransportManager.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TransportManager.cs index 62478ec578f49c57357b27fbbe6af6d9bdb4b0db..2c34795cf13d37b7551b8d8b762fabe8e02acae6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TransportManager.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TransportManager.cs @@ -3,6 +3,7 @@ #nullable enable +using System.Linq; using System.Net; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Http.Features; diff --git a/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs b/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs index f3ead77c3035ff2cf7e04305fe51b910fbf168c8..c94d5aaa727e7aeb51c297cf299b2dc7eae33b4e 100644 --- a/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs +++ b/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs @@ -5,6 +5,7 @@ using System.Buffers; using System.Collections.Concurrent; using System.Diagnostics; using System.IO.Pipelines; +using System.Linq; using System.Net.Http; using System.Net.Http.QPack; using System.Text; diff --git a/src/Shared/HttpSys/NativeInterop/HttpApiTypes.cs b/src/Shared/HttpSys/NativeInterop/HttpApiTypes.cs index f81b9ab53d26b1d0a631235c2e31eb1447add097..60c8a2e11da0aca1528df5904c00f628ccd09692 100644 --- a/src/Shared/HttpSys/NativeInterop/HttpApiTypes.cs +++ b/src/Shared/HttpSys/NativeInterop/HttpApiTypes.cs @@ -1,6 +1,9 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Security.Authentication; using Microsoft.AspNetCore.Http;