Closed ryanbrandenburg closed 5 years ago
What manual testing have you done on these changes?
To test I launched test/WebSites/Identity.DefaultUI.WebSite (bootstrap4) and test/WebSites/Identity.OpenIdConnect.WebSite (bootstrap3), confirmed that they had no errors in the console, looked about right, and that when you tried to submit an empty form you got the appropriate warnings in the UI.
@ryanbrandenburg You need to run the app in development and in production, launching it (I assume with F5 or dotnet run) is not good enough.
We don't care about test/WebSites/Identity.OpenIdConnect.WebSite
but for the default UI you need to run it on both environments as described above and make sure that there are no errors on the browser console (Visit login/register/manage)
I assume by that you mean:
dotnet run -f netcoreapp2.2 -c Release
dotnet run -f netcoreapp2.2 -c Debug
If so I've now tested it that way and we get no errors and working pages both ways.
@ryanbrandenburg No. I mean dotnet publish -c Release
-> dotnet /bin/Release/netcoreapp2.2/publish/app.dll
If I do that I get:
Unhandled Exception: System.IO.FileNotFoundException: Related assembly 'Microsoft.AspNetCore.Identity.UI.Views.V3' specified by assembly 'Microsoft.AspNetCore.Identity.UI' could not be found in the directory D:\dd\Identity\test\WebSites\Identity.DefaultUI.WebSite\bin\Release\netcoreapp2.2\publish. Related assemblies must be co-located with the specifying assemblies.
at Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute.GetRelatedAssemblies(Assembly assembly, Boolean throwOnError, Func`2 fileExists, Func`2 loadFile)
at Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute.GetRelatedAssemblies(Assembly assembly, Boolean throwOnError)
at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.<>c__DisplayClass3_0.<AddRelatedParts>b__0(ApplicationPartManager partManager) in D:\dd\Identity\src\UI\IdentityBuilderUIExtensions.cs:line 77
at Microsoft.Extensions.DependencyInjection.MvcCoreMvcBuilderExtensions.ConfigureApplicationPartManager(IMvcBuilder builder, Action`1 setupAction)
at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddRelatedParts(IdentityBuilder builder, UIFramework framework) in D:\dd\Identity\src\UI\IdentityBuilderUIExtensions.cs:line 132
at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddDefaultUI(IdentityBuilder builder, UIFramework framework) in D:\dd\Identity\src\UI\IdentityBuilderUIExtensions.cs:line 54
at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddDefaultUI(IdentityBuilder builder) in D:\dd\Identity\src\UI\IdentityBuilderUIExtensions.cs:line 33
at Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionUIExtensions.AddDefaultIdentity[TUser](IServiceCollection services, Action`1 configureOptions) in D:\dd\Identity\src\UI\IdentityServiceCollectionUIExtensions.cs:line 56
at Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionUIExtensions.AddDefaultIdentity[TUser](IServiceCollection services) in D:\dd\Identity\src\UI\IdentityServiceCollectionUIExtensions.cs:line 33
at Identity.DefaultUI.WebSite.StartupBase`2.ConfigureServices(IServiceCollection services) in D:\dd\Identity\test\WebSites\Identity.DefaultUI.WebSite\StartupBase.cs:line 41
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Identity.DefaultUI.WebSite.Program.Main(String[] args) in D:\dd\Identity\test\WebSites\Identity.DefaultUI.WebSite\Program.cs:line 16
which is a pre-existing condition because it happens on a totally clean branch.
By copying those dll's into the publish directory I found a couple instances of site.min.* remaining, which I fixed.
@ryanbrandenburg Those issues are expected as we are referencing the assembly as a project reference and not a package and we probably didn’t fixup publish.
Have you tried both versions of the UI? (V3 and V4)
Fixed one extra item I found when testing in V3.
Is that approval then?
Part of https://github.com/aspnet/Templating/issues/32.
Things I also did while I was at it:
@javiercn let me know if any of this needs to remain unchanged do to legacy. For example, should we just revert all the changes I made in */V3?