From 5c71742e4a90587ac06bf17eadf1791ea9b3cb1d Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Fri, 9 Aug 2019 15:56:09 +0200 Subject: [PATCH] [Identity] Add warnings when using Bootstrap3 and errors when using an unknown framework version (#12988) * [Identity] Add warnings when using Bootstrap3 and errors when using an unknown framework version --- .../Microsoft.AspNetCore.Identity.UI.csproj | 2 ++ .../Microsoft.AspnetCore.Identity.UI.targets | 34 +++++++++++++++++++ .../Microsoft.AspnetCore.Identity.UI.targets | 5 +++ .../Microsoft.AspnetCore.Identity.UI.targets | 5 +++ 4 files changed, 46 insertions(+) create mode 100644 src/Identity/UI/src/build/Microsoft.AspnetCore.Identity.UI.targets create mode 100644 src/Identity/UI/src/buildMultiTargeting/Microsoft.AspnetCore.Identity.UI.targets create mode 100644 src/Identity/UI/src/buildTransitive/Microsoft.AspnetCore.Identity.UI.targets diff --git a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj index 7fe773e2c6..3b2154e8f1 100644 --- a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj +++ b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj @@ -30,6 +30,8 @@ + + diff --git a/src/Identity/UI/src/build/Microsoft.AspnetCore.Identity.UI.targets b/src/Identity/UI/src/build/Microsoft.AspnetCore.Identity.UI.targets new file mode 100644 index 0000000000..b4238e7266 --- /dev/null +++ b/src/Identity/UI/src/build/Microsoft.AspnetCore.Identity.UI.targets @@ -0,0 +1,34 @@ + + + + + + <_IdentityUIBootstrap3WarningMessage>'Bootstrap3' is obsolete. It is recommended that the application is updated to use a supported Bootstrap version by removing the 'IdentityUIFrameworkVersion' property from '$(MSBuildProjectFile)' or setting 'IdentityUIFrameworkVersion' explicitly to 'Bootstrap4'. + + <_IdentityUIUnknownVersionErrorMessage>The 'IdentityUIFrameworkVersion' '$(IdentityUIFrameworkVersion)' in '$(MSBuildProjectFile)' is not valid. Valid versions are 'Bootstrap3' and 'Bootstrap4'. + + + + + <_IdentityUIActiveWarnings Include="IdentityUI001;IdentityUI002" Exclude="$(NoWarn)" /> + + + + + + + + + + + diff --git a/src/Identity/UI/src/buildMultiTargeting/Microsoft.AspnetCore.Identity.UI.targets b/src/Identity/UI/src/buildMultiTargeting/Microsoft.AspnetCore.Identity.UI.targets new file mode 100644 index 0000000000..fa5f1cabe2 --- /dev/null +++ b/src/Identity/UI/src/buildMultiTargeting/Microsoft.AspnetCore.Identity.UI.targets @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Identity/UI/src/buildTransitive/Microsoft.AspnetCore.Identity.UI.targets b/src/Identity/UI/src/buildTransitive/Microsoft.AspnetCore.Identity.UI.targets new file mode 100644 index 0000000000..52d91a14f5 --- /dev/null +++ b/src/Identity/UI/src/buildTransitive/Microsoft.AspnetCore.Identity.UI.targets @@ -0,0 +1,5 @@ + + + + +