Activities of "improwise"

Answer

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...

Answer

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.

Answer

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

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.

Answer

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

Answer

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

Answer

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

Haven't tried this in WASM but at least for server side Blazor, those instructions are not valid any more, as the DevExpress.Blazor package now seems to add a Startup.DevExpress.cs file containing this so probably not needed to add it manually. Also don't forgett about the @using DevExpress.Blazor which can be easy to miss but seems you have already done that.

//------------------------------------------------------------------------------ //<auto-generated> // Generated by the DevExpress.Blazor package. // To prevent this operation, add the DxExtendStartupHost property to the project and set this property to False. // // MIBS.Blazor.csproj: // // <Project Sdk="Microsoft.NET.Sdk.Web"> // <PropertyGroup> // <TargetFramework>net5.0</TargetFramework> // <DxExtendStartupHost>False</DxExtendStartupHost> // </PropertyGroup> //</auto-generated> //------------------------------------------------------------------------------ using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.AspNetCore.Hosting;

[assembly: HostingStartup(typeof(MIBS.Blazor.DevExpressHostingStartup))]

namespace MIBS.Blazor { public partial class DevExpressHostingStartup : IHostingStartup { void IHostingStartup.Configure(IWebHostBuilder builder) { builder.ConfigureServices((serviceCollection) => { serviceCollection.AddDevExpressBlazor(); }); } } }

Please get back with if this works or if you have found some other solution as we are also considering using DevExpress Blazor in a new project instead of Blazorise.

Edit:

Seems like things might be a bit different in the WASM world and that the startup.devexpress.cs isn't created by the package installer there.

yes !!! its working now
pff lost more then 1 week of developing due to this bug :-(

Glad you got it working, we also lost a lot of time on this and had to figure out ourselves how to find a workaround. Not optimal that a commercial product has to rely on customer helping out each other to get things working. It has us considering our options going forward as we are not really happy with how things have turned out recently and we are somewhat worried where things are heading in the future based on this. Let's hope that it is because of all attention being on the 5.0 release and that release is stellar...

created a solution based on 4.4.3, after removing and re-installing CLI with version 4.4.3 again.

abp new test_6 -t app-pro -u blazor-server -csf --output-folder C:\Projects\test_6 --mobile none

but still the same problem

what i noticed is that CLI still uses 'using cached template: app-pro, version 4.4.4'

can this be the reason ? how can the cached template be reset/removed ?

You need to specify the -v 4.4.3 option as ABP will always use latest version of packages regardless of CLI version if not. At least that is what we had to do after having figured out ourselves how to produce working ABP Commercial solutions since 4.4.4 was released. You can then add that to ABP Suite manually and CRUD generation etc. seem to work somewhat ok.

I no longer have problems with CLI 5.0.0-rc1, nuget and npms, but I'm on Blazor Server + EfCore Sql Server with VS 2022 17.0.1 since solution is based on .net 6.0

My steps:

  1. uninstalled abp e cli (4.4.4 main workstation and 5.0.0-beta3 notebook),
  2. install stable (4.4.4)
  3. update to pre-release (5.0.0-rc1)

Can confirm that RC1 seem to work better in this regard. Other problems though but that is to be expected on a RC version. The stable version on the other hand should not have these problems and we can't use none stable versions in a real world application. We have given up on ABP 4.4.4 for now as it seems unfixable. Let's hope there is lots of improvement in 5.0 when release...

Showing 131 to 140 of 171 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13