Suite is generating invalid C#. It's looks like it's leaving a replacement token on the end of property definitions.
I'm using Suite 3.3.1
[StringLength(BomListConsts.DescriptionMaxLength)]
public string Description { get; set; } %%initial-value%%
I've tried creating a brand new Suite project and adding a simple Foo entity with a sinle int property and I get the following code for the DTOs.
public class FoooCreateDto
{
public int? F1 { get; set; } %%initial-value%%
}
public class FoooDto : FullAuditedEntityDto<Guid>
{
public int? F1 { get; set; } %%initial-value%%
}
public class FoooUpdateDto
{
public int? F1 { get; set; } %%initial-value%%
}
The tool is absolutely unusable and I've wasted half a day trying different things to get it working thinking it was something wrong with my object definition.
This is unacceptable.
Please advise
7 Answer(s)
-
0
Hi,
I can't reproduce your problem, Is your solution consistent with the suite version? Can you provide steps to reproduce? thanks.
-
0
Make sure both your Suite and your ABP versions are the same. As I see this looks like you are using the latest version of Suite.
-
1
Fresh install of the abp cli and suite, generate solution from suite, open solution in vs2019 run db migrator project to create the db, add any entity with any props, the steps suceed from 1-8, step 9 the db migrator part fails as most of the related .cs documents end up placing %%initial-value%% next to the generated properties..
-
1
Initial-value problem seems to have dissapeared after i updated efcore tools from prev version 3.1.4 then it would still fail to generate the migration on the last step (angular project would get the info, classes also created in dotnetcore). It seems that if i manually add a migration (1 time) to the new project and apply it, i can then add entities from abp suite and it succeeds. Strange?
-
0
can you send us the project? info@abp.io
-
0
Hi Alper, I was replicating this in a new project for you but seems this new 3.3.2 fixed the issue
-
0
good! so update it to 3.3.2 I'm closing the issue. reopen if it continues... happy coding.