ErikEJ / EFCorePowerTools

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
MIT License
2.16k stars 295 forks source link

Property Renaming Stopped Working for me in version 2.5.1338 #1740

Closed dkline closed 1 year ago

dkline commented 1 year ago

Describe what is not working as expected.

After upgrading to the latest version of efpt (2.5.1338), the property renaming in my project stopped being applied. I downgraded to version 2.5.1316 and it started working again with no other changes.

Provide steps to reproduce

Update EF Power tools to latest version (2.5.1338), right click my efpt.config.json file and run the refresh command.

Please include a complete description or project that I can redo/run to reproduce the issue.

I'm hoping the configuration and info above is enough, but if not let me know and I can try and put together a full example.

My efpt.config.json file:

{ "CodeGenerationMode": 3, "ContextClassName": "LmDbContext", "ContextNamespace": null, "DefaultDacpacSchema": null, "FilterSchemas": false, "IncludeConnectionString": false, "ModelNamespace": null, "OutputContextPath": ".\Models\DatabaseContext", "OutputPath": ".\Models\Database", "PreserveCasingWithRegex": true, "ProjectRootNamespace": "LM", "Schemas": null, "SelectedHandlebarsLanguage": 0, "SelectedToBeGenerated": 0, "Tables": [ { "Name": "[dbo].[web_page]", "ObjectType": 0 }, { "Name": "[dbo].[web_page_type]", "ObjectType": 0 }, ],

"UncountableWords": null, "UseBoolPropertiesWithoutDefaultSql": false, "UseDatabaseNames": true, "UseDateOnlyTimeOnly": true, "UseDbContextSplitting": true, "UseFluentApiOnly": true, "UseHandleBars": true, "UseHierarchyId": false, "UseInflector": false, "UseLegacyPluralizer": false, "UseManyToManyEntity": false, "UseNoDefaultConstructor": false, "UseNoObjectFilter": false, "UseNodaTime": false, "UseNullableReferences": true, "UseSchemaFolders": false, "UseSpatial": false, "UseT4": false }

efpt.property-renaming.json

{ "Classes": [ { "Name": "web_page", "Properties": [ { "Name": "web_page_type", "NewName": "web_page_type", "AlternateName": "page_type_refNavigation" } ] } ] }

I'm not using the table/column renaming json file, and am using the table and column name that the database has (no automatic renaming).

Provide technical details

ErikEJ commented 1 year ago

I am not able to repro, please provide a sample schema a a console app with a repro.

ErikEJ commented 1 year ago

Also check the Extensions output window for errors/messages

dkline commented 1 year ago

I ended up updating visual studio to 17.5.2 and then upgrading efpt back up to the latest version. My issue seems to be resolved by doing that. Hopefully it was just a fluke on my system. Thanks for looking at it!