Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates are not used at runtime #305

Open
drventure opened this issue Jul 28, 2022 · 0 comments
Open

Templates are not used at runtime #305

drventure opened this issue Jul 28, 2022 · 0 comments

Comments

@drventure
Copy link

Describe the bug

the .TT and .TTINCLUDE templates are included in the package for the CLI, but, it appears that they are used at COMPILE time to generate the ODataT4CodeGenerator.CS file which is then compiled directly into the CODEGEN project.

In the actual connected service extension (that runs in Visual studio), the templates can be part of the output Client Odata library, and as such can be customized and then the Connected Service Client generated using the those custom templates

Version of the Project affected

ODataConnectedService v0.4.x
VisualStudio Version v16.4
Microsoft.Odata.Client v7.6.x

To Reproduce

Steps to reproduce the behavior:

  1. Install the Client Generator CLI
  2. Go to the TEMPLATES folder
  3. Modify the ODataT4CodeGenerator.TT file
  4. Run the CLI to generate a client for a project
  5. Note that the Generated code DOES NOT include any customizations that you made to the TT template in step 3

Expected behavior

I expect the Templates that are installed in the "Templates" folder to be used for OData Client generation, not a compiled in copy of the templates.

Actual behavior

The CLI ALWAYS uses the version of the templates that existed when the CLI was built to generate OData Client code.
That's essentially what the Connected Service does from Visual Studio.

Screenshots

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant