⚡ Update ABP CLI and ABP Suite
dotnet tool update -g Volo.Abp.Cli --prerelease
abp suite update --preview
📗 Blog post
- https://blog.abp.io/abp/ABP.IO-Platform-7-4-RC-Has-Been-Published
📘 Commercial release logs
- https://docs.abp.io/en/commercial/latest/release-notes
- https://commercial.abp.io/releases/
🔼 Migration guides
- https://docs.abp.io/en/abp/latest/Migration-Guides/Index
✏️ Feel free to report any bugs, issues and problems.
66 Answer(s)
-
0
- ABP Framework version: v7.4.0.rc-1
- UI Type: MVC
- Database System: EF Core (PostgreSQL)
- Tiered (for MVC) or Auth Server Separated (for Angular): no
There are a lot of warnings that can be included in the next RC. There are related to the IConfiguration interface.
For example, in OpenIddictDataSeedContributor.cs
Line 86: var webClientRootUrl = configurationSection["Demo74rc1_Web:RootUrl"].EnsureEndsWith('/'); Line 206: var blazorServerTieredRootUrl = configurationSection["Demo74rc1_BlazorServerTiered:RootUrl"].EnsureEndsWith('/'); Line 250:var webPublicRootUrl = configurationSection["Demo74rc1_Web_Public:RootUrl"].EnsureEndsWith('/'); Line 274: var webPublicTieredRootUrl = configurationSection["Demo74rc1_Web_Public_Tiered:RootUrl"].EnsureEndsWith('/');
To avoid those warnings, you include a null-forgiving operator(!) for the configurationSection variable.
-
0
ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no
There is an issue in test/Demo74rc1.TestBase/Security/FakeCurrentPrincipalAccessor.cs
private ClaimsPrincipal _principal;
_principal is not initialized in the constructor making a warning (or error if <WarningsAsErrors>Nullable</WarningsAsErrors> is setup)
A solution could be to make ClaimsPrincipal nullable
private ClaimsPrincipal? _principal;
In the same file, there is an issue with the implementation of the interface
The solution could be to change the interface ICurrentPrincipalAccessor.cs in Volo.Abp.Security.Claims and make the IDisposable as IDisposable?
public interface ICurrentPrincipalAccessor { ClaimsPrincipal Principal { get; } IDisposable? Change(ClaimsPrincipal principal); }
-
0
ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no
In src/Demo74rc1.Domain/OpenIddict/OpenIddictDataSeedContributor.cs
There is a possible null reference argument in that method (in visual studio and rider) because it's using the ABP wrapper of string.IsNullOrWhiteSpace(str)
If I replace the
if (!webPublicClientId.IsNullOrWhiteSpace())
with thisif (!string.IsNullOrWhiteSpace(webPublicClientId))
-
0
ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no
If <WarningsAsErrors>Nullable</WarningsAsErrors> is enabled, there is an issue with the property name.
It suggested adding the "required" modifier to solve this issue as shown next.
-
0
ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no
In a nullable reference-enabled project, there is a missing "?" in the parameter of MapHealthChecksUiEndpoints
Actual version:
private static IServiceCollection MapHealthChecksUiEndpoints (this IServiceCollection services, Action<global::HealthChecks.UI.Configuration.Options> setupOption = null) { services.Configure<AbpEndpointRouterOptions>(routerOptions => { routerOptions.EndpointConfigureActions.Add(endpointContext => { endpointContext.Endpoints.MapHealthChecksUI(setupOption); }); }); return services; }
It should be:
private static IServiceCollection MapHealthChecksUiEndpoints (this IServiceCollection services, Action<global::HealthChecks.UI.Configuration.Options>? setupOption = null) { services.Configure<AbpEndpointRouterOptions>(routerOptions => { routerOptions.EndpointConfigureActions.Add(endpointContext => { endpointContext.Endpoints.MapHealthChecksUI(setupOption); }); }); return services; }
-
0
In ABP Suite, there is an update in the entity generator, whenever you select a string, there is a new option to allow empty strings but it's only enabled when the "Required" option is checked.
What is the sense of allowing empty strings if it's required? Why not allow Nullable strings in the ABP Suite entity generator?
-
0
-
0
In the AppService generated by ABP Suite, there is an issue in some methods in the AppService if a non-nullable string property is created in an entity.
src/Demo74rc1.Application/EntityDemos/EntityDemosAppService.cs
A solution could be to use the Check.NotNull method
Adding this before the CreateAsync method call
input.StringColumn = Check.NotNull(input.StringColumn, nameof(input.StringColumn));
-
0
In the AppService generated by ABP Suite, there is an issue in some methods in the AppService if a non-nullable string property is created in an entity.
src/Demo74rc1.Application/EntityDemos/EntityDemosAppService.cs
A solution could be to use the Check.NotNull method
Adding this before the CreateAsync and UpdateAsync method call in the AppService generated class solve this issue.
input.StringColumn = Check.NotNull(input.StringColumn, nameof(input.StringColumn));
-
0
In the ABP Suite generated Entity in src/Demo74rc1.Domain/EntityDemos/EntityDemo.cs
There is no need to add an empty constructor. It will generated a Warning or Error (if WarningAsError is activated).
Can you consider removing it from the template?
This also happens in the .Extended version of the Entity generated class. The empty constructor should be removed from the template.
-
0
In the ABP Suite Generated code, there is an issue in the generated class test/Demo74rc1.TestBase/EntityDemos/EntityDemosDataSeedContributor.cs
Do we need a null validation in await _unitOfWorkManager.Current.SaveChangesAsync(); ?
Current property is nullable and there will be a warning or error (if WarningAsNull is activated)
-
0
-
1
-
0
In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.
Hi, thanks for your suggestion. This really makes sense, because otherwise if a custom method is added to the application service interface, it should be implemented in the application service base class and it will be overridden in the next generation, which we don't want in any case. I will create an internal issue for this.
-
0
Hello, are there any comments regarding my findings?
-
0
-
0
Hi, I have created an internal issue for your findings related to nullable warnings on Suite-generated codes.
In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.
This is fixed with v7.4.0-rc.2. Thanks again for reporting the problem.
thanks @EngincanV
-
0
-
0
in the leptonXtheme , user avatar path 404.
hi
This is fixed in the new version.
-
0
We will resolve all nullable warnings in 7.4
-
0
-
1
Hi, I have created an internal issue for your findings related to nullable warnings on Suite-generated codes.
In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.
This is fixed with v7.4.0-rc.2. Thanks again for reporting the problem.
hi, the same problem also exists in entityFramework layer.
-
0
Any quick fix for angular project with basic theme issue please ?
-
0
-
0
Why you generate all of these clients regardless the template used !!!
hi
This is exactly what template projects are for, you can remove clients you don't need.
-
0
**I think this is not logic **
adding not existing clients to your database is very confusing for deployment team
for example what is the benfite of adding
--mobile none
-u angular
in generation command then you found MVC and Mobile clientIds in your database !!! -
0
Thanks, I will create a internal issue for thsi.
-
0
Failed to login from public site
run this command to create a project
abp new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-auth-server -dbms SqlServer --separate-auth-server
Then run all web projects and try to login from public site , I got this error
note: I cleard the cache and remove all cookies many times but still same error
-
0
Generated public site
I notice some diffreneces between public site genrated when using angular template and mvc template in tiered architecture and separate auth server although in both cases the public site created as MVC project
Do you mean that ? why you don't use the same template for public site
I use these 2 commands
abp new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-auth-server -dbms SqlServer --separate-auth-server
abp new MyProject -t app-pro -u mvc --tiered --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-auth-server -dbms SqlServer -cs --separate-auth-server
then I opened public site project and found these diffrences in angular case
- no reCaptcha package
- no BackgroundWorkers
options.UsePkce = true;
only in angular case -
0
-
0
-
0
Thanks we will confirm the problem.
-
0
hi
You can use
--separate-identity-server
, we will be compatible in next rc.new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-identity-server -dbms SqlServer --separate-identity-server
-
0
hi
You can use
--separate-identity-server
, we will be compatible in next rc.new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-identity-server -dbms SqlServer --separate-identity-server
Please note I already use it in my command, you set it 2 times, actually this was not my issue
-
0
-
0
There is an issue with the version 7.4 rc-3. I have an issue with the following packages that couldn't be restored with this version
Unable to find package Volo.CmsKit.Pro.Common.Web. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\7.0.307\Sdks\Microsoft.NET.Sdk.Web\library-packs, Microsoft Visual Studio Offline Packages, nuget.org
-
0
There is an issue with the version 7.4 rc-3. I have an issue with the following packages that couldn't be restored with this version
Unable to find package Volo.CmsKit.Pro.Common.Web. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\7.0.307\Sdks\Microsoft.NET.Sdk.Web\library-packs, Microsoft Visual Studio Offline Packages, nuget.org
Hi, thanks for reporting. We will fix the problem and publish the packages asap.
-
0
There is an issue with the version 7.4 rc-3. I have an issue with the following packages that couldn't be restored with this version
Unable to find package Volo.CmsKit.Pro.Common.Web. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\7.0.307\Sdks\Microsoft.NET.Sdk.Web\library-packs, Microsoft Visual Studio Offline Packages, nuget.org
We have published the missing packages, please try again. (You might want to clear your Nuget cache if the package cannot be found on your first try.)
-
0
-
0
-
0
-
0
ABP Suite still generates EntityManager generated class with methods without null validation checking
In this example the GeoManager class is generating a Create Method with a parameter of type "string codigoInei = null".
It should be "string? codigoInei = null". This complicates us if I want to re-generate the ABP Suite. I will need to fix everytime.
-
0
-
0
There is another issue in the generated EfCoreEntityRepository.cs class
The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class
There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project). One method returns a nullable type while the other expects a non-nullable return value.
This is a critical error for the new version.
3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly. 3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))". 3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0
-
1
There is another issue in the generated EfCoreEntityRepository.cs class
The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class
There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project). One method returns a nullable type while the other expects a non-nullable return value.
This is a critical error for the new version.
3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly. 3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))". 3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0
The solution for this is the following.
In **EfCoreRepository.cs **
Replace this code:
public async override Task<TEntity> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
For this
public async override Task<TEntity?> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
And replace this code:
public virtual async Task<TEntity> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }
For this one public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }
-
0
Another observation,
There is no lepton 2.4.0-rc.3, is this normal?
-
0
-
0
-
0
There seems to be a bug when adding navigation collections (n:n) via Suite. In my case, I'm adding a navigation to a 'Tool' entity from 'ToolAssemblies' and get the following errors:
Edit: I should note this only occurs when using the 'Customizable code' option during crud page generation.
Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssemblyManagerBase.ToolAssemblyManagerBase(IToolAssemblyRepository, IRepository<Tool, Guid>)' ToolAssemblyManager.Extended.cs
Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssembliesAppServiceBase.ToolAssembliesAppServiceBase(IToolAssemblyRepository, ToolAssemblyManager, IDistributedCache<ToolAssemblyExcelDownloadTokenCacheItem, string>, IRepository<Tool, Guid>)' ToolAssembliesAppService.Extended.cs
-
0
There seems to be a bug when adding navigation collections (n:n) via Suite. In my case, I'm adding a navigation to a 'Tool' entity from 'ToolAssemblies' and get the following errors:
Edit: I should note this only occurs when using the 'Customizable code' option during crud page generation.
Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssemblyManagerBase.ToolAssemblyManagerBase(IToolAssemblyRepository, IRepository<Tool, Guid>)' ToolAssemblyManager.Extended.cs
Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssembliesAppServiceBase.ToolAssembliesAppServiceBase(IToolAssemblyRepository, ToolAssemblyManager, IDistributedCache<ToolAssemblyExcelDownloadTokenCacheItem, string>, IRepository<Tool, Guid>)' ToolAssembliesAppService.Extended.cs
Thanks for reporting. Whenever a many-to-many relation is established, it seems we also need to re-generate the ctor for the custom manager and appservice classes. I will create an issue for it and will fix it asap.
-
0
-
1
There is another issue in the generated EfCoreEntityRepository.cs class
The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class
There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project).
One method returns a nullable type while the other expects a non-nullable return value.This is a critical error for the new version.
3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly. 3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))". 3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0
The solution for this is the following.
In **EfCoreRepository.cs **
Replace this code:
public async override Task<TEntity> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
For this
public async override Task<TEntity?> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
And replace this code:
public virtual async Task<TEntity> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }
For this one public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }
Hi,
Is there any news about this issue?
Thanks!
-
0
There is another issue in the generated EfCoreEntityRepository.cs class
The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class
There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project).
One method returns a nullable type while the other expects a non-nullable return value.This is a critical error for the new version.
3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly. 3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))". 3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0
The solution for this is the following.
In **EfCoreRepository.cs **
Replace this code:
public async override Task<TEntity> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
For this
public async override Task<TEntity?> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
And replace this code:
public virtual async Task<TEntity> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }
For this one
public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)
{
return includeDetails
? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
: await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
}Hi,
Is there any news about this issue?
Thanks!
Hi Rafael, thanks for reporting. We have already fixed this (see https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs#L304) and enabled nullable annotations for all projects of both ABP Framework & ABP Commercial (https://github.com/abpframework/abp/issues/16610) and it will be available in v8.0.
-
0
There is another issue in the generated EfCoreEntityRepository.cs class
The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class
There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project).
One method returns a nullable type while the other expects a non-nullable return value.This is a critical error for the new version.
3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly. 3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))". 3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0
The solution for this is the following.
In **EfCoreRepository.cs **
Replace this code:
public async override Task<TEntity> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
For this
public async override Task<TEntity?> FindAsync( Expression<Func<TEntity, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); }
And replace this code:
public virtual async Task<TEntity> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }
For this one
public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)
{
return includeDetails
? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
: await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
}Hi,
Is there any news about this issue?
Thanks!
Hi Rafael, thanks for reporting. We have already fixed this (see https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs#L304) and enabled nullable annotations for all projects of both ABP Framework & ABP Commercial (https://github.com/abpframework/abp/issues/16610) and it will be available in v8.0.
Thanks for your answer!!
Why is not that solution included in 7.4? In my opinion, the fix of EfCoreRepository, it's critical because it can lead to data issues right now. Is it possible to include at least the EfCoreRepository fix only or a temporary workaround?
-
0
Why is not that solution included in 7.4? In my opinion, the fix of EfCoreRepository, it's critical because it can lead to data issues right now. Is it possible to include at least the EfCoreRepository fix only or a temporary workaround?
We aimed to enable nullable annotations for all our projects in v8.0 (https://github.com/abpframework/abp/issues/16610), therefore we have made the related changes on the
dev
branch and because of that all of those changes will be included in v8.0 and unfortunately, it's not possible for us to include this change in the 7.4 release. -
0
Hi, there is an issue in MAUI Android, ThemeManager doesnt change theme in dialog, you have to add the following line:
public class ThemeManager : ISingletonDependency { private readonly IStorage _storage; public ThemeManager(IStorage storage) { _storage = storage; } public async Task<AppTheme> GetAppThemeAsync() { var storedTheme = await _storage.GetAsync(GeSAConsts.Settings.Theme); if (!storedTheme.IsNullOrEmpty()) { #if ANDROID HandleAndroidDialogTheme(); #endif return Enum.Parse<AppTheme>(storedTheme); } return AppTheme.Unspecified; } public async Task SetAppThemeAsync(AppTheme theme) { App.Current!.UserAppTheme = theme; #if ANDROID HandleAndroidDialogTheme(); #endif await _storage.SetAsync(GeSAConsts.Settings.Theme, theme.ToString()); } private static void HandleAndroidDialogTheme() { AndroidX.AppCompat.App.AppCompatDelegate.DefaultNightMode = App.Current!.UserAppTheme switch { AppTheme.Light => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightNo, AppTheme.Dark => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightYes, AppTheme.Unspecified => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightFollowSystem, _ => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightFollowSystem }; } }
HTH :-)
-
0
Suite fails when generating angular front-end in microservice solution
Steps to produce:
- Create new microservice solution with
abp new Test -t microservice-pro -u angular -csf
- Migrate databases and launch project
- Use suite to generate a new entity in the ProductService
- Observe suite produces a success message:
- Re-load the angular UI
- Observe the permission for the new entity is created, but no UI has been added.
I've reverted Cli and Suite to 7.3.3 and confirmed that this sequence works correctly in the previous version.
This is the suite log output showing the error:
2023-10-21 18:18:10.157 +01:00 [INF] 1/14 - EntityGenerateCommand started... 2023-10-21 18:18:12.449 +01:00 [INF] 1/14 - EntityGenerateCommand completed. | Duration: 2287 ms. 2023-10-21 18:18:12.449 +01:00 [INF] 2/14 - RepositoryCommand started... 2023-10-21 18:18:12.583 +01:00 [INF] 2/14 - RepositoryCommand completed. | Duration: 134 ms. 2023-10-21 18:18:12.583 +01:00 [INF] 3/14 - ManagerCommand started... 2023-10-21 18:18:12.625 +01:00 [INF] 3/14 - ManagerCommand completed. | Duration: 41 ms. 2023-10-21 18:18:12.625 +01:00 [INF] 4/14 - AppServiceCommand started... 2023-10-21 18:18:18.596 +01:00 [INF] 4/14 - AppServiceCommand completed. | Duration: 5970 ms. 2023-10-21 18:18:18.596 +01:00 [INF] 5/14 - ProxyControllerCommand started... 2023-10-21 18:18:18.627 +01:00 [INF] 5/14 - ProxyControllerCommand completed. | Duration: 31 ms. 2023-10-21 18:18:18.627 +01:00 [INF] 6/14 - PermissionCommand started... 2023-10-21 18:18:18.677 +01:00 [INF] 6/14 - PermissionCommand completed. | Duration: 49 ms. 2023-10-21 18:18:18.677 +01:00 [INF] 7/14 - ApplicationObjectMappingCommand started... 2023-10-21 18:18:18.692 +01:00 [INF] 7/14 - ApplicationObjectMappingCommand completed. | Duration: 14 ms. 2023-10-21 18:18:18.692 +01:00 [INF] 8/14 - UnitTestCommandCommand started... 2023-10-21 18:18:18.762 +01:00 [INF] 8/14 - UnitTestCommandCommand completed. | Duration: 70 ms. 2023-10-21 18:18:18.762 +01:00 [INF] 9/14 - GenerateProxyCommand started... 2023-10-21 18:18:18.814 +01:00 [INF] 9/14 - GenerateProxyCommand completed. | Duration: 52 ms. 2023-10-21 18:18:18.815 +01:00 [INF] 10/14 - MvcUiGenerateCommand started... 2023-10-21 18:18:19.016 +01:00 [INF] 10/14 - MvcUiGenerateCommand completed. | Duration: 201 ms. 2023-10-21 18:18:19.016 +01:00 [INF] 11/14 - MvcObjectMappingCommand started... 2023-10-21 18:18:19.035 +01:00 [INF] 11/14 - MvcObjectMappingCommand completed. | Duration: 19 ms. 2023-10-21 18:18:19.035 +01:00 [INF] 12/14 - MvcMenuContributorCommand started... 2023-10-21 18:18:19.101 +01:00 [INF] 12/14 - MvcMenuContributorCommand completed. | Duration: 65 ms. 2023-10-21 18:18:19.101 +01:00 [INF] 13/14 - AngularUiGenerateWithSchematicsCommand started... 2023-10-21 18:18:51.525 +01:00 [INF] Running the Angular Schematics command: node run-schematics.mjs '/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/.bin/ng' g '.suite/schematics/collection.json:entity' microservice-pro Test.ProductService '/Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json' '/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular' 2023-10-21 18:18:56.009 +01:00 [INF] Angular Schematics command failed. /Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/execa/lib/error.js:60 error = new Error(message); ^ Error: Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target Test.ProductService --source /Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json [Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace. at makeError (/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/execa/index.js:118:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async file:///Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/run-schematics.mjs:6:20 { shortMessage: 'Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target Test.ProductService --source /Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json', command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target Test.ProductService --source /Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json', escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template microservice-pro --target Test.ProductService --source "/Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json"', exitCode: 1, signal: undefined, signalDescription: undefined, stdout: '', stderr: '[Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.', failed: true, timedOut: false, isCanceled: false, killed: false } Node.js v18.17.1 2023-10-21 18:18:56.025 +01:00 [INF] 13/14 - AngularUiGenerateWithSchematicsCommand completed. | Duration: 36923 ms.
- Create new microservice solution with
-
0
Hello!
There is an issue in the interface with the following structure
public interface IDEMODbContext : IEfCoreDbContext
The DbSet properties there shouldn't have the null forgiven because it's an interface. There is no template to customize it and even if you fix it, every time you generate it from Suite, a new line with the same error gets created.
-
0
There is also an issue in the file DEMOApplicationTests.cs
There should be a null forgiven in every result.Property or we will be having compilation error. It happens because the result is a nullable variable.
It happens in the following methods.
- public async Task CreateAsync()
- public async Task UpdateAsync()
-
0
-
0
Bug Report: IdentityClaimType Version: 7.4.1 App: MVC Application How to reproduce Bug:-
- Create a new ClaimType
- Assign ClaimType to Users and Roles
- Bug1: When you delete previously created and assigned ClaimTypes, it doesn't give any error that this claim is in use in User & Role.
- Bug 2: Deleting Claim Types, delete from AbpClaimTypes but it doesn't delete from AbpRoleClaims and AbpUserClaims.
- Bug 3: AbpRoleClaims and AbpUserClaims can only be deleted by deleting them from the backend DatabaseServer, not from UI
. . . Is there any quickfix I can use in my production server?
-
0
-
0
if someone has startup issue with MAUI Mobile for Android see this
-
0
abp update ABP CLI 7.4.2 Cannot update Volo.* packages! An error occurred while updating the package "Volo.Abp.Core". Error: Object reference not set to an instance of an object. Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectModification.VoloNugetPackagesVersionUpdater.UpdateVoloPackagesAsync(String content, Boolean includeNightlyPreviews, Boolean includeReleaseCandidates, Boolean switchToStable, SemanticVersion latestNugetVersion, SemanticVersion latestNugetReleaseCandidateVersion, String latestMyGetVersion, String specifiedVersion) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\VoloNugetPackagesVersionUpdater.cs:line 184 Volo packages are updated in Taitans.Abp.Commercial.Core project.
-
0
Hello, Can we have a "Bugs & Issues" thread for v8.0.0?
-
0
Hello, Can we have a "Bugs & Issues" thread for v8.0.0?
Hi, thanks for reminding. Here is the thread link: https://support.abp.io/QA/Questions/6260/Bugs--Issues-v80x