sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics (you need a .edu or a .ac email address), not free for commercial use. Obtain your licence from
https://www.reversepoco.co.uk/
Other
706 stars 230 forks source link

EF6.Utility.CS.ttinclude not resolved #752

Closed kurt-o-matic closed 2 years ago

kurt-o-matic commented 2 years ago

On my first attempt to use 3.6.0 in a new project using VS 2022/.NET 6/EF Core, I get "Failed to resolve include text for file: ..\EF6.Utility.CS.ttinclude" from Line 8 in EF.Reverse.POCO.v3.ttinclude. Ironically, the first search result for this filename is the VS Marketplace page for Reverse POCO that instructs VS 2012 & 2013 users to install the Entity Framework 6 Tools with a dead link to Microsoft.

Removing this include from Line 8 results in more errors from EF.Reverse.POCO.v3.ttinclude, so presuming that it's a valid dependency, how can a new user with a fresh install of VS 2022 resolve this error?

sjh37 commented 2 years ago

Hi @kurt-o-matic The EF6.Utility.CS.ttinclude should be included with Visual Studio if you select the components for installation. https://stackoverflow.com/q/14999633/5884

Try this solution: https://stackoverflow.com/a/49616287/5884 and let me know how you get on

kurt-o-matic commented 2 years ago

Thanks, Simon! That helps.

It's not quite that simple with VS 2022; there are a variety of optional components in the "ASP.NET and web development" workload, and the default options do not include this file. Specifically, I'm guessing the "Entity Framework 6 tools" component is the one we're after (Component ID: Microsoft.VisualStudio.Component.EntityFramework). Since I am using an offline installer for VS 2022 with a local layout, I need to go back and tweak my layout and response.json configuration file. I'll report back my findings on this once I've solved the problem. It would be useful to know exactly which workload component is required for this Reverse POCO dependency.

kurt-o-matic commented 2 years ago

Confirmed.

The required VS 2022 component is Microsoft.VisualStudio.Component.EntityFramework, which can be selected from the list of optional packages under the "ASP.NET and web development" workload, and is listed as "Entity Framework 6 tools".

As a reminder, the VisualStudio Marketplace page for Reverse POCO implies the EF6 tools package is only required for VS 2012 & 2013, and contains a dead link to the MS download API.

Thanks, and 3.6.0 is working great. 👍

sjh37 commented 2 years ago

Thank you @kurt-o-matic I'll update the documentation.

sjh37 commented 2 years ago

I'm actually thinking of splitting this product into two: EF6 and EFCore. EFCore would not need the dependancy on EF6.Utility.CS.ttinclude and could also be used with Jetbrains Rider.

kurt-o-matic commented 2 years ago

That would be great! I'm starting a green field project on .NET 6 and chasing down EF6 dependencies seemed vestigial.

On Mon, May 2, 2022, 11:21 AM Simon Hughes @.***> wrote:

I'm actually thinking of splitting this product into two: EF6 and EFCore. EFCore would not need the dependancy on EF6.Utility.CS.ttinclude and could also be used with Jetbrains Rider.

— Reply to this email directly, view it on GitHub https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/752#issuecomment-1115087847, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEB724XELDTFA3IT7OMQVHTVH76IBANCNFSM5UTK2HVQ . You are receiving this because you were mentioned.Message ID: <sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/752/1115087847 @github.com>

sjh37 commented 1 year ago

Thanks. If you can find out for me I'd be very greatful, and will update the documentation. That file is only required for EF6, and not EFCore. I've been thinking of dropping it and going purely EFCore.

-------- Original message -------- From: kurt-o-matic @.> Date: 29/04/2022 10:46 p.m. (GMT+00:00) To: sjh37/EntityFramework-Reverse-POCO-Code-First-Generator @.> Cc: Simon Hughes @.>, Comment @.> Subject: Re: [sjh37/EntityFramework-Reverse-POCO-Code-First-Generator]   EF6.Utility.CS.ttinclude not resolved (Issue #752)

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/752#issuecomment-1113775951", "url": "https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/752#issuecomment-1113775951", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]