diff --git a/src/Security/Authorization/Core/src/AuthorizationServiceCollectionExtensions.cs b/src/Security/Authorization/Core/src/AuthorizationServiceCollectionExtensions.cs index 0f788cd5ad..57fcf253b7 100644 --- a/src/Security/Authorization/Core/src/AuthorizationServiceCollectionExtensions.cs +++ b/src/Security/Authorization/Core/src/AuthorizationServiceCollectionExtensions.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.DependencyInjection public static class AuthorizationServiceCollectionExtensions { /// - /// Adds authorization services to the specified . + /// Adds authorization services to the specified . /// /// The to add services to. /// The so that additional calls can be chained. @@ -24,7 +24,11 @@ namespace Microsoft.Extensions.DependencyInjection { throw new ArgumentNullException(nameof(services)); } - + + // These services depend on options, and they are used in Blazor WASM, where options + // aren't included by default. + services.AddOptions(); + services.TryAdd(ServiceDescriptor.Transient()); services.TryAdd(ServiceDescriptor.Transient()); services.TryAdd(ServiceDescriptor.Transient()); @@ -35,7 +39,7 @@ namespace Microsoft.Extensions.DependencyInjection } /// - /// Adds authorization services to the specified . + /// Adds authorization services to the specified . /// /// The to add services to. /// An action delegate to configure the provided . diff --git a/src/Security/build.sh b/src/Security/build.sh new file mode 100755 index 0000000000..7046bb98a0 --- /dev/null +++ b/src/Security/build.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +repo_root="$DIR/../.." +"$repo_root/build.sh" --projects "$DIR/**/*.*proj" "$@"