Skip to content

Tweak AddRazorPages trimming warning. #49377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static class RazorComponentsServiceCollectionExtensions
/// </summary>
/// <param name="services">The service collection.</param>
/// <returns>An <see cref="IRazorComponentsBuilder"/> that can be used to further configure the Razor component services.</returns>
[RequiresUnreferencedCode("Razor Components does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Razor Components does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IRazorComponentsBuilder AddRazorComponents(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static class ComponentServiceCollectionExtensions
/// <param name="services">The <see cref="IServiceCollection"/>.</param>
/// <param name="configure">A callback to configure <see cref="CircuitOptions"/>.</param>
/// <returns>An <see cref="IServerSideBlazorBuilder"/> that can be used to further customize the configuration.</returns>
[RequiresUnreferencedCode("Server-side Blazor does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Server-side Blazor does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IServerSideBlazorBuilder AddServerSideBlazor(this IServiceCollection services, Action<CircuitOptions>? configure = null)
{
var builder = new DefaultServerSideBlazorBuilder(services);
Expand Down
4 changes: 2 additions & 2 deletions src/Identity/Core/src/IdentityServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class IdentityServiceCollectionExtensions
/// <typeparam name="TRole">The type representing a Role in the system.</typeparam>
/// <param name="services">The services available in the application.</param>
/// <returns>An <see cref="IdentityBuilder"/> for creating and configuring the identity system.</returns>
[RequiresUnreferencedCode("Identity middleware does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Identity middleware does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IdentityBuilder AddIdentity<TUser, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TRole>(
this IServiceCollection services)
where TUser : class
Expand All @@ -42,7 +42,7 @@ public static class IdentityServiceCollectionExtensions
/// <param name="services">The services available in the application.</param>
/// <param name="setupAction">An action to configure the <see cref="IdentityOptions"/>.</param>
/// <returns>An <see cref="IdentityBuilder"/> for creating and configuring the identity system.</returns>
[RequiresUnreferencedCode("Identity middleware does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Identity middleware does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IdentityBuilder AddIdentity<TUser, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TRole>(
this IServiceCollection services,
Action<IdentityOptions> setupAction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class SessionServiceCollectionExtensions
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to add the services to.</param>
/// <returns>The <see cref="IServiceCollection"/> so that additional calls can be chained.</returns>
[RequiresUnreferencedCode("Session State middleware does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Session State middleware does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IServiceCollection AddSession(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand All @@ -34,7 +34,7 @@ public static IServiceCollection AddSession(this IServiceCollection services)
/// <param name="services">The <see cref="IServiceCollection"/> to add the services to.</param>
/// <param name="configure">The session options to configure the middleware with.</param>
/// <returns>The <see cref="IServiceCollection"/> so that additional calls can be chained.</returns>
[RequiresUnreferencedCode("Session State middleware does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Session State middleware does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IServiceCollection AddSession(this IServiceCollection services, Action<SessionOptions> configure)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class MvcRazorPagesMvcCoreBuilderExtensions
/// </summary>
/// <param name="builder">The <see cref="IMvcCoreBuilder"/>.</param>
/// <returns>The <see cref="IMvcCoreBuilder"/>.</returns>
[RequiresUnreferencedCode("Razor Pages does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Razor Pages does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcCoreBuilder AddRazorPages(this IMvcCoreBuilder builder)
{
ArgumentNullException.ThrowIfNull(builder);
Expand Down
16 changes: 8 additions & 8 deletions src/Mvc/Mvc/src/MvcServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class MvcServiceCollectionExtensions
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <returns>An <see cref="IMvcBuilder"/> that can be used to further configure the MVC services.</returns>
[RequiresUnreferencedCode("MVC does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("MVC does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddMvc(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand All @@ -42,7 +42,7 @@ public static IMvcBuilder AddMvc(this IServiceCollection services)
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <param name="setupAction">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param>
/// <returns>An <see cref="IMvcBuilder"/> that can be used to further configure the MVC services.</returns>
[RequiresUnreferencedCode("MVC does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("MVC does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddMvc(this IServiceCollection services, Action<MvcOptions> setupAction)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down Expand Up @@ -79,7 +79,7 @@ public static IMvcBuilder AddMvc(this IServiceCollection services, Action<MvcOpt
/// on the resulting builder.
/// </para>
/// </remarks>
[RequiresUnreferencedCode("MVC does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("MVC does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddControllers(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down Expand Up @@ -114,7 +114,7 @@ public static IMvcBuilder AddControllers(this IServiceCollection services)
/// on the resulting builder.
/// </para>
/// </remarks>
[RequiresUnreferencedCode("MVC does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("MVC does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddControllers(this IServiceCollection services, Action<MvcOptions>? configure)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down Expand Up @@ -172,7 +172,7 @@ private static IMvcCoreBuilder AddControllersCore(IServiceCollection services)
/// To add services for pages call <see cref="AddRazorPages(IServiceCollection)"/>.
/// </para>
/// </remarks>
[RequiresUnreferencedCode("MVC does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("MVC does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddControllersWithViews(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down Expand Up @@ -205,7 +205,7 @@ public static IMvcBuilder AddControllersWithViews(this IServiceCollection servic
/// To add services for pages call <see cref="AddRazorPages(IServiceCollection)"/>.
/// </para>
/// </remarks>
[RequiresUnreferencedCode("MVC does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("MVC does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddControllersWithViews(this IServiceCollection services, Action<MvcOptions>? configure)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down Expand Up @@ -253,7 +253,7 @@ private static IMvcCoreBuilder AddControllersWithViewsCore(IServiceCollection se
/// To add services for controllers with views call <see cref="AddControllersWithViews(IServiceCollection)"/>.
/// </para>
/// </remarks>
[RequiresUnreferencedCode("Razor Pages does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Razor Pages does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddRazorPages(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down Expand Up @@ -284,7 +284,7 @@ public static IMvcBuilder AddRazorPages(this IServiceCollection services)
/// To add services for controllers with views call <see cref="AddControllersWithViews(IServiceCollection)"/>.
/// </para>
/// </remarks>
[RequiresUnreferencedCode("Razor Pages does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("Razor Pages does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static IMvcBuilder AddRazorPages(this IServiceCollection services, Action<RazorPagesOptions>? configure)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static ISignalRServerBuilder AddHubOptions<THub>(this ISignalRServerBuild
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <returns>An <see cref="ISignalRServerBuilder"/> that can be used to further configure the SignalR services.</returns>
[RequiresUnreferencedCode("SignalR does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("SignalR does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static ISignalRServerBuilder AddSignalR(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand All @@ -55,7 +55,7 @@ public static ISignalRServerBuilder AddSignalR(this IServiceCollection services)
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <param name="configure">An <see cref="Action{HubOptions}"/> to configure the provided <see cref="HubOptions"/>.</param>
/// <returns>An <see cref="ISignalRServerBuilder"/> that can be used to further configure the SignalR services.</returns>
[RequiresUnreferencedCode("SignalR does not currently support native AOT.", Url = "https://aka.ms/aspnet/nativeaot")]
[RequiresUnreferencedCode("SignalR does not currently support trimming or native AOT.", Url = "https://aka.ms/aspnet/trimming")]
public static ISignalRServerBuilder AddSignalR(this IServiceCollection services, Action<HubOptions> configure)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down