怪了,可能是我硬件问题。
[maliming] said:
居然呀47分钟才能生成完成。
每次都可以复现吗? 有详细的步骤吗?
你应该可以使用最新的Studio和老版本的suite
最新的Studio,创建的项目包版本是V9.2.3的,使用abp suite V9.1.1进行生成会提示版本不匹配生成失败。尝试将项目包版本手动降级到V9.1.1之后,项目就无法运行了,最好是能在创建项目时就指定使用的包版本是V9.1.1
刚才测试的AbpSolution4的Solution Configuration如下:
以下是我测试过程中的截图:
1)命令行进入正常加载出来需要05:05
2)创建完成HelloWorld类,点Save and generate之后,出现1/10进度条的时间为04:30
3) 20%进度
4) 第九步的状态
最终完成时,我手机记录的时间为47分30秒
之前suite的版本是9.1.1,最近看到有更新就升级了一下Studio和Suite。 我尝试更换了项目模板为“Applicaton(Layered)”新建了一个新的项目,还是同样的类进行生成,时间控制在10分钟以内。后来又重新创建了一个Application(Single Layer)的项目,生成同样的类,时间长得离谱,居然呀47分钟才能生成完成。 我还是换成Layered Application模板来建项目吧,感觉是Abp Suite对于Single Layer的没有做好性能优化。
另外想问一下,如果我想切换回之前的9.1.1版本,Abp Suite可以轻松切换,但是Abp Studio没找到位置,有没有Abp Studio V9.1.1版本的windows x64安装包的链接可以提供?
[AI-Bot] said:
你遇到的 ABP Suite 代码生成极慢问题(如生成实体、仓储等步骤耗时数分钟),在 ABP 社区中有类似反馈,且官方已给出排查建议。
该问题常见原因:
- 解决方案目录下存在大量无关文件(如 node_modules、bin、obj、.git 等),导致 Suite 在扫描和生成代码时极度缓慢。
- 代码生成时 ABP Suite 会递归遍历整个解决方案目录,若有大量大文件或无关目录,会严重拖慢速度。
解决办法:
- 请确保你的解决方案目录下没有 node_modules、bin、obj、.git 等体积大或无关的目录。可以将这些目录移出解决方案目录,或在 .abpignore 文件中排除它们。
- 建议在 ABP Suite 代码生成前,清理无关目录,仅保留必要的项目文件。
- 参考官方支持帖的详细说明和后续建议:ABP Suite CRUD Generator: startIndex must be non-negative
该问题并非 v9.2.3 升级特有,而是与目录结构和文件数量密切相关。清理目录后,代码生成速度会显著提升。
参考链接(已验证):
- https://abp.io/support/questions/9489
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
以上使用的是测试项目,非老项目,不存在以上表述的存在大量无关文件等原因,还请技术支持帮忙看看。
Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration
button.
Template: app-nolayers
Created ABP Studio Version: 1.1.2
Current ABP Studio Version: 1.1.2
Multi-Tenancy: Yes
UI Framework: angular
Theme: leptonx
Theme Style: system
Theme Menu Placement: side
Run Install Libs: Yes
Database Provider: ef
Database Management System: sqlserver
Create Initial Migration: Yes
Run Db Migrator: Yes
Social Login: No
Use Local References: No
Optional Modules:
Selected Languages: English, 简体中文
Default Language: English
Create Command: abp new AbpSolution2 -t app-nolayers --ui-framework angular --mobile --database-provider ef --database-management-system sqlserver --theme leptonx --no-tests --without-cms-kit --dont-run-bundling --no-social-logins -file-management
Exception message and full stack trace:
Steps to reproduce the issue:
尝试新建HelloWord类,包含Name,Code,Descrition3个字段,生成过程的截图:
是升级之后导致的吗?该如何解决?
感谢回复,etc处把端口调整过来之后abp studio中的端口显示就恢复正常了。
VS通过IIS Express运行的方式暂时还不行,调整为对应项目就可以了,可能IIS Express的限制
你创建的troubleshoot problems文章很不错,最近碰到通过模块化开发创建的模块在导入安装之后碰到了一些问题,之前碰到貌似没有解决,是否可以帮忙参谋一下,这个是Ticket链接(ID:9317): https://abp.io/support/questions/9317/Modular-development-with-Abp-Suite-encountered-an-exception--The-entity-type-%27ExtraPropertyDictionary%27-requires-a-primary-key-to-be-defined
Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration
button.
Template: app-nolayers
Created ABP Studio Version: 0.9.26
Current ABP Studio Version: 0.9.26
Multi-Tenancy: No
UI Framework: mvc
Theme: leptonx
Theme Style: system
Theme Menu Placement: side
Run Install Libs: Yes
Database Provider: ef
Database Management System: postgresql
Create Initial Migration: Yes
Run Db Migrator: Yes
Social Login: No
Use Local References: No
Optional Modules:
Create Command: abp new LaunchX.AuthServer -t app-nolayers --ui-framework mvc --mobile --database-provider ef --database-management-system postgresql --theme leptonx --no-tests --without-cms-kit --dont-run-bundling --no-multi-tenancy --no-social-logins -no-saas -no-file-management
Exception message and full stack trace:
Before modifying the port, the authorization service runs normally:
after I changed the port from 44300 to 4000, it not work!
appsettings.json configuration:
{
"App": {
"SelfUrl": "https://localhost:4000",
"CorsOrigins": "http://localhost:4200,https://localhost:44334,https://localhost:44303",
"HealthCheckUrl": "/health-status"
},
"ConnectionStrings": {
"Default": "Host=localhost;Port=5432;Database=A_AuthServer;User ID=post;Password=pos;"
},
"AuthServer": {
"Authority": "https://localhost:4000",
"CertificatePassPhrase": "505ce01d-d074-4e0d-8cf0-1cffd6d5187b"
},
"Settings": {
"Abp.Identity.Password.RequireNonAlphanumeric": "false",
"Abp.Identity.Password.RequireLowercase": "false",
"Abp.Identity.Password.RequireUppercase": "false",
"Abp.Identity.Password.RequireDigit": "false"
},
"StringEncryption": {
"DefaultPassPhrase": "8r1vt8i7phv1x3Sc"
}
}
launchSettings.json configuration:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:4000/",
"sslPort": 4000
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"LaunchX.AuthServer": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:4000/"
}
}
}
I checked the usage status of the port and found that port 4000 is not occupied.
Is there any other configuration missing?
AbpModularSolution1DbContext Code:
[ReplaceDbContext(typeof(IIdentityProDbContext))]
[ConnectionStringName("Default")]
public class AbpModularSolution1DbContext :
AbpDbContext<AbpModularSolution1DbContext>,
IIdentityProDbContext
{
/* Add DbSet properties for your Aggregate Roots / Entities here. */
#region Entities from the modules
/* Notice: We only implemented IIdentityProDbContext
* and replaced them for this DbContext. This allows you to perform JOIN
* queries for the entities of these modules over the repositories easily. You
* typically don't need that for other modules. But, if you need, you can
* implement the DbContext interface of the needed module and use ReplaceDbContext
* attribute just like IIdentityProDbContext .
*
* More info: Replacing a DbContext of a module ensures that the related module
* uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
*/
// Identity
public DbSet<IdentityUser> Users { get; set; }
public DbSet<IdentityRole> Roles { get; set; }
public DbSet<IdentityClaimType> ClaimTypes { get; set; }
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
public DbSet<IdentityUserDelegation> UserDelegations { get; set; }
public DbSet<IdentitySession> Sessions { get; set; }
#endregion
public AbpModularSolution1DbContext(DbContextOptions<AbpModularSolution1DbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureTestModule();
/* Include modules to your migration db context */
builder.ConfigurePermissionManagement();
builder.ConfigureSettingManagement();
builder.ConfigureBackgroundJobs();
builder.ConfigureAuditLogging();
builder.ConfigureFeatureManagement();
builder.ConfigureIdentityPro();
builder.ConfigureOpenIddictPro();
builder.ConfigureLanguageManagement();
builder.ConfigureFileManagement();
builder.ConfigureChat();
builder.ConfigureTextTemplateManagement();
builder.ConfigureGdpr();
builder.ConfigureBlobStoring();
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
//{
// b.ToTable(AbpModularSolution1Consts.DbTablePrefix + "YourEntities", AbpModularSolution1Consts.DbSchema);
// b.ConfigureByConvention(); //auto configure for the base class props
// //...
//});
}
}