Note sure if this should be posted to GitHub Issues instead but it seems the "abp new TodoApp -u angular" command uses app-pro version which I recall is commercial one.
If you're creating a bug/problem report, please include followings:
This problem seem to be back in 5.1.4
https://support.abp.io/QA/Questions/1662/More-than-one-DBContext-was-found
When following the instructions for
https://docs.abp.io/en/abp/latest/Tutorials/Todo/Index?UI=NG&DB=EF
(angular version)
you get:
More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands.
If you specify
Add-Migration Added_TodoItem -Context TodoAppDbContext
Migration is created but you still get an error:
Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException: Exception of type 'Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException' was thrown. at Microsoft.Extensions.Hosting.HostFactoryResolver.HostingListener.OnNext(KeyValuePair
2 value)
` at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at TodoApp.Program.Main(String[] args) in *******\src\TodoApp\aspnet-core\src\TodoApp.HttpApi.Host\Program.cs:line 39
To undo this action, use Remove-Migration.``
(We are using Package Manage Console in VS)
ABP Suite 5.1.2
After upgrading trying to access audit logs getting the following error.[ERR] Invalid column name 'ImpersonatorTenantName'.
Invalid column name 'ImpersonatorUserName'.
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'ImpersonatorTenantName'.
Invalid column name 'ImpersonatorUserName'.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)You have to use add-migration and then run dbmigrator
Can confirm I had the same problem and this solution worked fine.
After upgrading from ABP 5.0 to 5.1.2.
AbpException: Could not find the bundle file '/libs/@fortawesome/fontawesome-free/css/all.css' for the bundle 'Blazor.LeptonTheme.Global'!
Also tried updating Blazorise to latest version but to no avail.
Also, ABPs websites are painfully slow right now, including the supportsite.
Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, List<BundleTagHelperItem> bundleItems, string bundleName) Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpBundleTagHelperService<TTagHelper, TService>.ProcessAsync(TagHelperContext context, TagHelperOutput output) Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count) MIBS.Blazor.Pages.Pages__Host.<ExecuteAsync>b__17_0() in _Host.cshtml + ...
Seems like this is a problem with ABP Suite, when updating ABP packages through it, it decided for an unknown reason to simply delete wwwroot/libs and some other folders. Using "abp update" instead seemed to work.
After upgrading from ABP 5.0 to 5.1.2.
AbpException: Could not find the bundle file '/libs/@fortawesome/fontawesome-free/css/all.css' for the bundle 'Blazor.LeptonTheme.Global'!
Also tried updating Blazorise to latest version but to no avail.
Also, ABPs websites are painfully slow right now, including the supportsite.
Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, List<BundleTagHelperItem> bundleItems, string bundleName) Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpBundleTagHelperService<TTagHelper, TService>.ProcessAsync(TagHelperContext context, TagHelperOutput output) Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count) MIBS.Blazor.Pages.Pages__Host.<ExecuteAsync>b__17_0() in _Host.cshtml + <abp-style-bundle name="@BlazorLeptonThemeBundles.Styles.Global" /> Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync() MIBS.Blazor.Pages.Pages__Host.ExecuteAsync() in _Host.cshtml + <html lang="@CultureInfo.CurrentCulture.Name" dir="@rtl"> Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts) Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode) Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0<TFilter, TFilterAsync>(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeResultFilters>g__Awaited|28_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d.MoveNext() Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Newly created Blazor Server solution with ABP and ABP Suite 5.0 still won't build in VS2019, only in VS2022
Severity Code Description Project File Line Suppression State Error CS1576 The line number specified for #line directive is missing or invalid MIBS.Blazor M:\P............\obj\Debug\net5.0\Razor\Components\Layout\MainFooterComponent.razor.g.cs 111 Active
(Same problem as with 4.4.4)
Edit: Apparently, ABP CLI 5.0 and ABP Suite 5.0 still creates solutions with 4.4.4 NuGets...
Getting this after upgrading a RC1 solution to RC2
System.TypeLoadException HResult=0x80131522 Message=Method 'DatePicker' in type 'Blazorise.Bootstrap5.BootstrapClassProvider' from assembly 'Blazorise.Bootstrap5, Version=0.9.5.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Source=Blazorise.Bootstrap5 StackTrace: at Blazorise.Bootstrap5.Config.AddBootstrap5Providers(IServiceCollection serviceCollection, Action`1 configureClassProvider) at MIBS.Blazor.MIBSBlazorModule.ConfigureBlazorise(ServiceConfigurationContext context) in M:\Projects\MinKredit\MIBSPOC\src\aspnet-core\src\MIBS.Blazor\MIBSBlazorModule.cs:line 274 at MIBS.Blazor.MIBSBlazorModule.ConfigureServices(ServiceConfigurationContext context) in M:\Projects\MinKredit\MIBSPOC\src\aspnet-core\src\MIBS.Blazor\MIBSBlazorModule.cs:line 114 at Volo.Abp.AbpApplicationBase.ConfigureServices()
Solution seem to be to manually upgrade Blazor NuGet to latest version.
C:\Users\XXXX> abp suite install
[13:08:29 INF] ABP CLI (https://abp.io)
[13:08:29 INF] Version 5.0.0-rc.1 (Prerelease)
[13:08:29 INF] Installing ABP Suite latest version...
Failed to create shell shim for tool 'volo.abp.suite': Command 'abp-suite' conflicts with an existing command from another tool.
Tool 'volo.abp.suite' failed to install.
[13:08:33 INF] You can also run the following command to install ABP Suite.
[13:08:33 INF] dotnet tool install -g Volo.Abp.Suite --add-source https://nuget.abp.io/<your-private-key>/v3/index.jsonThis seem to be related to the previous "abp suite uninstall" command not working properly and leaving files behind. See https://support.abp.io/QA/Questions/587/ABP-Suite-Issues
this is somehow related to donet tool commands because abp suite remove uses dotnet tool uninstall command. it sometimes leave files behind if some files of the tool is being used at that time. in that case I suggest to delete the following Suite folder from your computer.
You need to replace
X.X.X
with your Suite version%UserProfile%\.dotnet\tools\.store\volo.abp.suite
Yes, we were able to solve this the way I mentioned, perhaps could have been clearer about that.
ABP Suite still generates faulty code for Blazor Server, I guess one of the templates are wrong. If it is possible to change this even before the release of 5.0, please tell as it breaks migrations etc currently from ABP Suite 5.0 RC 1.
For created and update, await is missing, like
private async Task CreateCompanyTypeAsync()
{
try
{
if (NewCompanyTypeValidations?.ValidateAll() == false)
{
return;
}
await CompanyTypesAppService.CreateAsync(NewCompanyType);
await GetCompanyTypesAsync();
CreateCompanyTypeModal.Hide();
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
Should be if (await (NewCompanyTypeValidations?.ValidateAll()) == false) to compile.
Can we change a template or something to make this work until fixed?
Edit:
Seems like it is this template that needs to be modified as above Frontend.Blazor.Page.Item.razor_cs.txt
C:\Users\XXXX> abp suite install [13:08:29 INF] ABP CLI (https://abp.io) [13:08:29 INF] Version 5.0.0-rc.1 (Prerelease) [13:08:29 INF] Installing ABP Suite latest version... Failed to create shell shim for tool 'volo.abp.suite': Command 'abp-suite' conflicts with an existing command from another tool. Tool 'volo.abp.suite' failed to install. [13:08:33 INF] You can also run the following command to install ABP Suite. [13:08:33 INF] dotnet tool install -g Volo.Abp.Suite --add-source https://nuget.abp.io/<your-private-key>/v3/index.json
This seem to be related to the previous "abp suite uninstall" command not working properly and leaving files behind. See https://support.abp.io/QA/Questions/587/ABP-Suite-Issues