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

T4.BuildTools OutputDirectory/OutputFileName #180

Open
gerneio opened this issue Feb 2, 2024 · 2 comments
Open

T4.BuildTools OutputDirectory/OutputFileName #180

gerneio opened this issue Feb 2, 2024 · 2 comments

Comments

@gerneio
Copy link

gerneio commented Feb 2, 2024

Referring to the BuildTools Readme, supposedly there's a way to specify the OutputDirectory and/or the OutputFileName, However I haven't been able to figure out a way to do this. I've tried the following:

  <PropertyGroup>
    ...
    <TransformOnBuild>true</TransformOnBuild>
  </PropertyGroup>
  <ItemGroup>
    ...
    <PackageReference Include="T4.BuildTools" Version="3.0.0-preview-0049-g4f33c8d8b1" />
  </ItemGroup>
    ...
  <ItemGroup>
    <T4Transform Include="foo.tt">
      <OutputDirectory>test</OutputDirectory>
    </T4Transform>
  </ItemGroup>
  <PropertyGroup>
    ...
    <TransformOnBuild>true</TransformOnBuild>
    <OutputDirectory>test</OutputDirectory>
  </PropertyGroup>
  <ItemGroup>
    ...
    <PackageReference Include="T4.BuildTools" Version="3.0.0-preview-0049-g4f33c8d8b1" />
  </ItemGroup>
    ...
  <ItemGroup>
    <T4Transform Include="foo.tt" />
  </ItemGroup>

Are these two options supported yet?

Ultimately, I just want to copy these text file templates to the build output, however this didn't work either:

  <PropertyGroup>
    ...
    <TransformOnBuild>true</TransformOnBuild>
  </PropertyGroup>
  <ItemGroup>
    ...
    <PackageReference Include="T4.BuildTools" Version="3.0.0-preview-0049-g4f33c8d8b1" />
  </ItemGroup>
    ...
  <ItemGroup>
    <T4Transform Include="foo.tt" />
    <Content Include="foo.txt" CopyToOutputDirectory="true" />
  </ItemGroup>

I can confirm that the foo.txt file is being generated, just next to the template file, which I'd assume is the default.

@drewcassidy
Copy link

Having the same issue, really frustrating thing to not have working

@trysetnull
Copy link

trysetnull commented Dec 2, 2024

We came-up with a clunky workaround: #129

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

3 participants