Skip to content

T4.BuildTools OutputDirectory/OutputFileName #180

@gerneio

Description

@gerneio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions