-
ABP Framework version: v9.0.2
-
UI Type: Blazor Server
-
Database System: EF Core (SQL Server)
-
Tiered (for MVC) or Auth Server Separated (for Angular): no
-
Exception message and full stack trace:
-
Steps to reproduce the issue:
Hello.
I referenced the link https://abp.io/docs/commercial/latest/abp-suite/customizing-the-generated-code and made a few attempts. But I am having the problem I explain below.
I defined an entity named “CacheMessages”. When I add a new column to this entity (when migration happens in ABP Suite), the codes I wrote in the 'MyProject.Blazor/Pages/CacheMessages.Extended.razor.cs' file are automatically deleted.
Before save and generate:
public partial class CacheMessages
{
my custom codes...
}
After save and generate (in ABP Suite):
public partial class CacheMessages
{
}
At the same time, I may need to customize the methods in MyProject.Blazor/Pages/CacheMessages.razor.cs created by ABP by default (for example, adding a new button inside the SetToolbarItemsAsync method, etc.). How should I use MyProject.Blazor/Pages/CacheMessages.extended.razor.cs to prevent this?
Can you help me with this issue?
8 Answer(s)
-
0
Hi, there was a problem with the custom code support in the prior versions, and it was fixed with v9.0.5+. So, if you update ABP Suite to v9.0.5, then you should be able to re-generate without losing your custom code changes.
Best regards.
-
0
Dear Engincan
I upgraded ABP suite version to v9.1.0. The same problems still exist.
-
0
Dear Engincan
I upgraded ABP suite version to v9.1.0. The same problems still exist.
Hi, you mean it still regenerates the .extended.cs file each time? I will check this.
-
0
Thank you for your support. If there is anything I can help you with, just let me know.
-
0
Thank you for your support. If there is anything I can help you with, just let me know.
Hi, thanks for your understanding. I have tested just before and indeed the problem is not fixed for the
.extended.razor.cs
files (but it works for.extended.cs
files). I will create an internal issue for that, thanks for reporting.Btw, your ticket is refunded. Best regards.
-
0
Hi,
Thank you for refunding my ticket.
How can I be notified when the problem is solved?
-
0
Hi,
Thank you for refunding my ticket.
How can I be notified when the problem is solved?
I have opened a PR for this problem and it will be included in the next patch release. So, when v9.1.1 is released, you can try it out.
-
0
Thank you for your supports.
Regards.