ErikEJ / EFCorePowerTools

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

T4 Template not found? #2254

Closed papiermache closed 5 months ago

papiermache commented 5 months ago

Hello, I downloaded latest, select T4 and got following msg:

"The latest T4 template version could not be found, looking for 'Template version: 800' in the T4 file - please update your T4 templates, for example by renaming the CodeTemplates folder."

ErikEJ commented 5 months ago

Which T4 selection exactly?

Did you have t4 templates already?

papiermache commented 5 months ago

G’morning Erik,

The error occurs when trying to select “C# T4 (POCO)”

Regards, rick.

From: Erik Ejlskov Jensen @.> Sent: Tuesday, April 2, 2024 1:27 AM To: ErikEJ/EFCorePowerTools @.> Cc: papiermache @.>; Author @.> Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

Which T4 selection exactly?

Did you have t4 templates already?

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2031108208 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GM7JONFXUDQSYDCM23Y3I6RVAVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZRGEYDQMRQHA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ABJC5GOK4CYGESFCHJNRV5LY3I6RVA5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZCBAHA.gif Message ID: @. @.> >

ErikEJ commented 5 months ago

I implemented a fix for this in the latest daily build, would be grateful if you could try it out.

If you like my free tools, I would be very grateful for a rating or review on Visual Studio Marketplace or even a one-time or monthly sponsorship

papiermache commented 5 months ago

Hello Erik, I installed this latest, and when launched VS got this error now:

From: Erik Ejlskov Jensen @.> Sent: Tuesday, April 2, 2024 9:41 AM To: ErikEJ/EFCorePowerTools @.> Cc: papiermache @.>; Author @.> Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

I implemented a fix for this in the latest daily build https://www.vsixgallery.com/extension/f4c4712c-ceae-4803-8e52-0e2049d5de9f , would be grateful if you could try it out.

If you like my free tools, I would be very grateful for a rating or review on Visual Studio Marketplace https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools&ssr=false#review-details or even a one-time or monthly sponsorship https://github.com/sponsors/ErikEJ?frequency=one-time&sponsor=ErikEJ

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2032078117 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GMLA4CKX2M2ALW5ZM3Y3KYPFAVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSGA3TQMJRG4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ABJC5GOI37NOUOWG7XCKXEDY3KYPFA5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZD4GSK.gif Message ID: @. @.> >

papiermache commented 5 months ago

Additional info – last entries from the log xml file noted below:

422 Information VisualStudio Begin package load [EFCorePowerToolsPackage] {F4C4712C-CEAE-4803-8E52-0E2049D5DE9F} 423 Error VisualStudio SetSite failed for package [EFCorePowerToolsPackage]Source: 'EFCorePowerTools' Description: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.17.0.146, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ApplicationInsights, Version=2.17.0.146, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.ApplicationInsights, Version=2.17.0.146, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at EFCorePowerTools.Helpers.Telemetry.TrackException(Exception ex) at EFCorePowerTools.EFCorePowerToolsPackage.<>c__DisplayClass10_0.<<LogError>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run(Func`1 asyncMethod) at EFCorePowerTools.EFCorePowerToolsPackage.LogError(List`1 statusMessages, Exception exception) at EFCorePowerTools.EFCorePowerToolsPackage.<InitializeAsync>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass21_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. {F4C4712C-CEAE-4803-8E52-0E2049D5DE9F}
0x80070002

From: @. @.> Sent: Tuesday, April 2, 2024 11:25 AM To: 'ErikEJ/EFCorePowerTools' @.>; 'ErikEJ/EFCorePowerTools' @.> Cc: 'Author' @.***> Subject: RE: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

Hello Erik, I installed this latest, and when launched VS got this error now:

From: Erik Ejlskov Jensen @. @.> > Sent: Tuesday, April 2, 2024 9:41 AM To: ErikEJ/EFCorePowerTools @. @.> > Cc: papiermache @. @.> >; Author @. @.> > Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

I implemented a fix for this in the latest daily build https://www.vsixgallery.com/extension/f4c4712c-ceae-4803-8e52-0e2049d5de9f , would be grateful if you could try it out.

If you like my free tools, I would be very grateful for a rating or review on Visual Studio Marketplace https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools&ssr=false#review-details or even a one-time or monthly sponsorship https://github.com/sponsors/ErikEJ?frequency=one-time&sponsor=ErikEJ

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2032078117 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GMLA4CKX2M2ALW5ZM3Y3KYPFAVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSGA3TQMJRG4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ABJC5GOI37NOUOWG7XCKXEDY3KYPFA5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZD4GSK.gif Message ID: @. @.> >

ErikEJ commented 5 months ago

Which VS version?

Have you tried restarting VS?

papiermache commented 5 months ago

VS2022

And yes restarted VS (could not install while was running).

From: Erik Ejlskov Jensen @.> Sent: Tuesday, April 2, 2024 11:40 AM To: ErikEJ/EFCorePowerTools @.> Cc: papiermache @.>; Author @.> Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

Which VS version?

Have you tried restarting VS?

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2032407564 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GPIXZPWOBBGWLZ2L53Y3LGNDAVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSGQYDONJWGQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ABJC5GOFXYZ3BKXIERAE5ELY3LGNDA5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZEQKAY.gif Message ID: @. @.> >

ErikEJ commented 5 months ago

Which exact VS version, please.

papiermache commented 5 months ago

Sorry: 17.8.3

From: Erik Ejlskov Jensen @.> Sent: Tuesday, April 2, 2024 1:00 PM To: ErikEJ/EFCorePowerTools @.> Cc: papiermache @.>; Author @.> Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

Which exact VS version, please.

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2032583205 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GKCSYQFK3PUMSQFE3DY3LP2NAVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSGU4DGMRQGU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ABJC5GJNWPF35QCUCJN67HTY3LP2NA5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZE3BCK.gif Message ID: @. @.> >

ErikEJ commented 5 months ago

I will investigate

ErikEJ commented 5 months ago

@papiermache The crash should be fixed in the latest daily. (Build .211 or later)

papiermache commented 5 months ago

Hello Erik,

Yes build 211 resolved the issue. Some other points – I know you must be busy but if you have a few mins:

  1. The generated readme – could it not be put into the solution folder instead of the appdata/blahblahblah folder? It is convenient to be able to re-open and re-view the content, right now only way is to re-generate so that it gets re-opened – an irritation for novices.

  2. Now that I am able to generate either ( T4 or T4(POCO) ) – I see no difference in the generated models. Is there some doc somewhere that explains why/what one versus the other?

a. On your page: https://github.com/ErikEJ/EFCorePowerTools?tab=readme-ov-file, the 3 ‘Related NuGet packages’ links are all 404’s.

  1. You have now both handlebars and T4 – what is your thinking, are you planning to move away from handlebars and over to T4 (or vice versa)? Imo handlebars are more limiting in what you can do with them, but T4 ties product to VS.

  2. This tooling is so useful I really think you should have a ‘community freeware’ and paid versions – your product is a superior (imo) competitor to Reverse POCO Generator https://www.reversepoco.co.uk/ – I’ve used both (and others) extensively over decade+ as a contractor/consultant to many clients. And especially that you have a cross-platform CLI version this is great thing to be free from VS dependency (a game changer!).

  3. My current contract was terminated yesterday aft (a corporate buyout) ☹ - I will have free time for a while and am hoping to contribute to your excellent project if possible. Some features that I would like to have (and that I have already privately implemented in my own fork of Rev POCO Gen):

a. Generation of ‘value object https://martinfowler.com/bliki/ValueObject.html ’ keys entities – finally now practical with EF 8’s introduction of complex types support, b. Generation of enums from reference data tables, c. Option to remove any ties to EF so that could use Dapper instead.

  1. For very large models it would be nice to have better control over folder setup – context in its own folder, configurations in their own, models in their own and all sub-foldered by schema. Also some control over “configuration” suffix that is appended to those files.

Anyhow, a great product much appreciated by the developer community.

Regards, Rick.

Enterprise Solutions Consultant

TOGAF 9 Certified, PMP

MCSD [Web.SQL,ALM], MCT

Mulesoft Certified Platform Architect & Developer

Xamarin Certified Mobile Developer

Cell: 905-717-7168

Off: 289-858-2658

@.> @.

From: Erik Ejlskov Jensen @.> Sent: Wednesday, April 3, 2024 2:39 AM To: ErikEJ/EFCorePowerTools @.> Cc: papiermache @.>; Mention @.> Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

@papiermache https://github.com/papiermache The crash should be fixed in the latest daily. (Build .211 or later)

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2033673103 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GMDMOJPULOP6DRVGV3Y3OPYXAVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZTGY3TGMJQGM . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ABJC5GL4BXBV5GDJ6CBXRSTY3OPYXA5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZG5RY6.gif Message ID: @. @.> >

ErikEJ commented 5 months ago

Thanks for your feedback and heads up:

re 1: You can disable opening of the readme via Tools/Options

re 2: POCO is really not for use with EF Core, it omits navigation and use attributes - see https://github.com/ErikEJ/EFCorePowerTools/blob/master/src/GUI/EFCorePowerTools/POCOEntityType.t4

re 3: T4 is fully supported also on Linux and via my command line tool - the CLI does not support Handlebars, so there is your "direction"

re 4: Thanks, I have sponsorship arrangements, please take advantage of these - some even include some free goodies.

re 5: OK- sorry for you, but consider it an opportunity. Please start by creating issues for these features, so we can discuss feasibility and design.

re 6: There are multiple folder options available, have a look at the extensive docs.

papiermache commented 5 months ago

Thank you Erik for your prompt reply – I will look into your comment further and will log issues for consideration.

Regards, Rick.

From: Erik Ejlskov Jensen @.> Sent: Wednesday, April 3, 2024 8:03 AM To: ErikEJ/EFCorePowerTools @.> Cc: papiermache @.>; Mention @.> Subject: Re: [ErikEJ/EFCorePowerTools] T4 Template not found? (Issue #2254)

Thanks for your feedback and heads up:

re 1: You can disable opening of the readme via Tools/Options

re 2: POCO is really not for use with EF Core, it omits navigation and use attributes - see https://github.com/ErikEJ/EFCorePowerTools/blob/master/src/GUI/EFCorePowerTools/POCOEntityType.t4

re 3: T4 is fully supported also on Linux and via my command line tool - the CLI does not support Handlebars, so there is your "direction"

re 4: Thanks, I have sponsorship arrangements, please take advantage of these - some even include some free goodies.

re 5: OK- sorry for you, but consider it an opportunity. Please start by creating issues for these features, so we can discuss feasibility and design.

re 6: There are multiple folder options available, have a look at the extensive docs.

— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2254#issuecomment-2034393305 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJC5GKWY2KRNUK64AAT3ZLY3PVX3AVCNFSM6AAAAABFSEB5RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGM4TGMZQGU . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ABJC5GOWXAQKBK3ZKD4WHI3Y3PVX3A5CNFSM6AAAAABFSEB5RWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZIJQNS.gif Message ID: @. @.> >