Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DefaultBuilder/src/WebHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore;
/// <summary>
/// Provides convenience methods for creating instances of <see cref="IWebHost"/> and <see cref="IWebHostBuilder"/> with pre-configured defaults.
/// </summary>
[Obsolete("WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static class WebHost
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Hosting/Abstractions/src/IWebHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Hosting;
/// <summary>
/// Represents a configured web host.
/// </summary>
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public interface IWebHost : IDisposable
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Hosting/Abstractions/src/IWebHostBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IWebHostBuilder
/// <summary>
/// Builds an <see cref="IWebHost"/> which hosts a web application.
/// </summary>
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
IWebHost Build();

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Hosting/Hosting/src/WebHostBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Hosting;
/// <summary>
/// A builder for <see cref="IWebHost"/>
/// </summary>
[Obsolete("WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.", DiagnosticId = "ASPDEPR004")]
[Obsolete("WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.", DiagnosticId = "ASPDEPR004", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public class WebHostBuilder : IWebHostBuilder
{
private readonly HostingEnvironment _hostingEnvironment;
Expand Down
2 changes: 1 addition & 1 deletion src/Hosting/Hosting/src/WebHostExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Hosting;
/// <summary>
/// Contains extensions for managing the lifecycle of an <see cref="IWebHost"/>.
/// </summary>
[Obsolete("WebHostExtensions is obsolete. Use Host.CreateDefaultBuilder or WebApplication.CreateBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("WebHostExtensions is obsolete. Use Host.CreateDefaultBuilder or WebApplication.CreateBuilder instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static class WebHostExtensions
{
/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions src/Hosting/TestHost/src/TestServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public TestServer(IServiceProvider services, IFeatureCollection featureCollectio
/// For use with IWebHostBuilder.
/// </summary>
/// <param name="builder"></param>
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public TestServer(IWebHostBuilder builder)
: this(builder, CreateTestFeatureCollection())
{
Expand All @@ -91,7 +91,7 @@ public TestServer(IWebHostBuilder builder)
/// </summary>
/// <param name="builder"></param>
/// <param name="featureCollection"></param>
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public TestServer(IWebHostBuilder builder, IFeatureCollection featureCollection)
{
ArgumentNullException.ThrowIfNull(builder);
Expand All @@ -113,7 +113,7 @@ public TestServer(IWebHostBuilder builder, IFeatureCollection featureCollection)
/// <summary>
/// Gets the <see cref="IWebHost" /> instance associated with the test server.
/// </summary>
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public IWebHost Host
{
get
Expand Down
4 changes: 2 additions & 2 deletions src/Hosting/TestHost/src/WebHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static IWebHostBuilder UseTestServer(this IWebHostBuilder builder, Action
/// </summary>
/// <param name="host"></param>
/// <returns></returns>
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static TestServer GetTestServer(this IWebHost host)
{
return (TestServer)host.Services.GetRequiredService<IServer>();
Expand All @@ -64,7 +64,7 @@ public static TestServer GetTestServer(this IWebHost host)
/// </summary>
/// <param name="host"></param>
/// <returns></returns>
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static HttpClient GetTestClient(this IWebHost host)
{
return host.GetTestServer().CreateClient();
Expand Down
2 changes: 1 addition & 1 deletion src/Hosting/WindowsServices/src/WebHostService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Hosting.WindowsServices;
/// Provides an implementation of a Windows service that hosts ASP.NET Core.
/// </summary>
[DesignerCategory("Code")]
[Obsolete("Use UseWindowsService and AddHostedService instead. For more information, visit https://aka.ms/aspnet/deprecate/009.", DiagnosticId = "ASPDEPR009")]
[Obsolete("Use UseWindowsService and AddHostedService instead. For more information, visit https://aka.ms/aspnet/deprecate/009.", DiagnosticId = "ASPDEPR009", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public class WebHostService : ServiceBase
{
private readonly IWebHost _host;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Hosting.WindowsServices;
/// <summary>
/// Extensions to <see cref="IWebHost"/> for hosting inside a Windows service.
/// </summary>
[Obsolete("Use UseWindowsService and AddHostedService instead. For more information, visit https://aka.ms/aspnet/deprecate/009.", DiagnosticId = "ASPDEPR009")]
[Obsolete("Use UseWindowsService and AddHostedService instead. For more information, visit https://aka.ms/aspnet/deprecate/009.", DiagnosticId = "ASPDEPR009", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static class WebHostWindowsServiceExtensions
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class ForwardedHeadersOptions
/// Address ranges of known proxies to accept forwarded headers from.
/// Obsolete, please use <see cref="KnownIPNetworks"/> instead
/// </summary>
[Obsolete("Please use KnownIPNetworks instead. For more information, visit https://aka.ms/aspnet/deprecate/005.", DiagnosticId = "ASPDEPR005")]
[Obsolete("Please use KnownIPNetworks instead. For more information, visit https://aka.ms/aspnet/deprecate/005.", DiagnosticId = "ASPDEPR005", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public IList<AspNetIPNetwork> KnownNetworks => _knownNetworks;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/HttpOverrides/src/IPNetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.HttpOverrides;
/// A representation of an IP network based on CIDR notation.
/// Please use <see cref="System.Net.IPNetwork"/> instead
/// </summary>
[Obsolete("Please use System.Net.IPNetwork instead. For more information, visit https://aka.ms/aspnet/deprecate/005.", DiagnosticId = "ASPDEPR005")]
[Obsolete("Please use System.Net.IPNetwork instead. For more information, visit https://aka.ms/aspnet/deprecate/005.", DiagnosticId = "ASPDEPR005", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public class IPNetwork
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure;
/// <summary>
/// Type that provides access to an <see cref="ActionContext"/>.
/// </summary>
[Obsolete("ActionContextAccessor is obsolete and will be removed in a future version. For more information, visit https://aka.ms/aspnet/deprecate/006.", DiagnosticId = "ASPDEPR006")]
[Obsolete("ActionContextAccessor is obsolete and will be removed in a future version. For more information, visit https://aka.ms/aspnet/deprecate/006.", DiagnosticId = "ASPDEPR006", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public class ActionContextAccessor : IActionContextAccessor
{
internal static readonly IActionContextAccessor Null = new NullActionContextAccessor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure;
/// <summary>
/// Defines an interface for exposing an <see cref="ActionContext"/>.
/// </summary>
[Obsolete("IActionContextAccessor is obsolete and will be removed in a future version. For more information, visit https://aka.ms/aspnet/deprecate/006.", DiagnosticId = "ASPDEPR006")]
[Obsolete("IActionContextAccessor is obsolete and will be removed in a future version. For more information, visit https://aka.ms/aspnet/deprecate/006.", DiagnosticId = "ASPDEPR006", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public interface IActionContextAccessor
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationParts;
/// <summary>
/// Static class that adds methods to <see cref="AssemblyPart"/>.
/// </summary>
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003")]
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static class AssemblyPartExtensions
{
/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// Static class that adds razor compilation extension methods.
/// </summary>
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003")]
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static class RazorRuntimeCompilationMvcBuilderExtensions
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// Static class that adds razor runtime compilation extension methods.
/// </summary>
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003")]
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public static class RazorRuntimeCompilationMvcCoreBuilderExtensions
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation;
/// <summary>
/// A file provider <see cref="RazorProjectItem"/>.
/// </summary>
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003")]
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public class FileProviderRazorProjectItem : RazorProjectItem
{
private readonly string _root;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation;
/// <summary>
/// Used to configure razor compilation.
/// </summary>
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003")]
[Obsolete("Razor runtime compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. For more information, visit https://aka.ms/aspnet/deprecate/003.", DiagnosticId = "ASPDEPR003", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
public class MvcRazorRuntimeCompilationOptions
{
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ private static void EnsureDepsFile()
/// <param name="builder">The <see cref="IWebHostBuilder"/> used to
/// create the server.</param>
/// <returns>The <see cref="TestServer"/> with the bootstrapped application.</returns>
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the overloads that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the overloads that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
protected virtual TestServer CreateServer(IWebHostBuilder builder) => new(builder);

/// <summary>
Expand Down Expand Up @@ -856,7 +856,7 @@ public DelegatedWebApplicationFactory(
_configuration = configureWebHost;
}

[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead.", DiagnosticId = "ASPDEPR008")]
[Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
protected override TestServer CreateServer(IWebHostBuilder builder) => _createServer(builder);

protected override TestServer CreateServer(IServiceProvider serviceProvider) => _createServerFromServiceProvider(serviceProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static class OpenApiEndpointConventionBuilderExtensions
/// </remarks>
/// <param name="builder">The <see cref="IEndpointConventionBuilder"/>.</param>
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
[Obsolete("WithOpenApi is deprecated and will be removed in a future release. For more information, visit https://aka.ms/aspnet/deprecate/002.", DiagnosticId = "ASPDEPR002")]
[Obsolete("WithOpenApi is deprecated and will be removed in a future release. For more information, visit https://aka.ms/aspnet/deprecate/002.", DiagnosticId = "ASPDEPR002", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
[RequiresDynamicCode(TrimWarningMessage)]
[RequiresUnreferencedCode(TrimWarningMessage)]
public static TBuilder WithOpenApi<TBuilder>(this TBuilder builder) where TBuilder : IEndpointConventionBuilder
Expand All @@ -49,7 +49,7 @@ public static TBuilder WithOpenApi<TBuilder>(this TBuilder builder) where TBuild
/// <param name="builder">The <see cref="IEndpointConventionBuilder"/>.</param>
/// <param name="configureOperation">An <see cref="Func{T, TResult}"/> that returns a new OpenAPI annotation given a generated operation.</param>
/// <returns>A <see cref="IEndpointConventionBuilder"/> that can be used to further customize the endpoint.</returns>
[Obsolete("WithOpenApi is deprecated and will be removed in a future release. For more information, visit https://aka.ms/aspnet/deprecate/002.", DiagnosticId = "ASPDEPR002")]
[Obsolete("WithOpenApi is deprecated and will be removed in a future release. For more information, visit https://aka.ms/aspnet/deprecate/002.", DiagnosticId = "ASPDEPR002", UrlFormat = "https://aka.ms/aspnet/deprecate/{0}")]
[RequiresDynamicCode(TrimWarningMessage)]
[RequiresUnreferencedCode(TrimWarningMessage)]
public static TBuilder WithOpenApi<TBuilder>(this TBuilder builder, Func<OpenApiOperation, OpenApiOperation> configureOperation)
Expand Down
1 change: 1 addition & 0 deletions src/Shared/Obsoletions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Microsoft.AspNetCore.Shared;
internal sealed class Obsoletions
{
internal const string RuntimeSharedUrlFormat = "https://aka.ms/dotnet-warnings/{0}";
internal const string AspNetCoreSharedUrlFormat = "https://aka.ms/aspnet/deprecate/{0}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will end up being https://aka.ms/aspnet/deprecate/aspdepr003? Not https://aka.ms/aspnet/deprecate/003


internal const string RuntimeTlsCipherAlgorithmEnumsMessage = "KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties are obsolete. Use NegotiatedCipherSuite instead.";
internal const string RuntimeTlsCipherAlgorithmEnumsDiagId = "SYSLIB0058";
Expand Down
Loading