Skip to content

Commit

Permalink
Merge pull request #163 from mono/fix-packaging
Browse files Browse the repository at this point in the history
Fix some packaging issues
  • Loading branch information
mhutch committed Oct 2, 2023
2 parents 5e63517 + 52e3f36 commit e1a447e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Mono.TextTemplating.Build/Mono.TextTemplating.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<BuildOutputTargetFolder>buildTasks</BuildOutputTargetFolder>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReadmeFile>readme.md</PackageReadmeFile>
</PropertyGroup>

<Target Name="AddTargetsFilesToPack" BeforeTargets="GenerateNuspec">
Expand All @@ -30,6 +31,7 @@
</Target>

<ItemGroup>
<None Include="readme.md" Pack="true" PackagePath="\" />
<ProjectReference Include="..\Mono.TextTemplating\Mono.TextTemplating.csproj" PrivateAssets="all" />
<PackageReference Include="MessagePackAnalyzer" Version="2.5.129" PrivateAssets="all" />
<PackageReference Include="MessagePack" Version="2.5.129" PrivateAssets="all" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<Description>In-process Roslyn compiler for the Mono.TextTemplating T4 templating engine</Description>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<EnablePackageValidation>true</EnablePackageValidation>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions dotnet-t4/dotnet-t4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<ToolCommandName>t4</ToolCommandName>
<RootNamespace>Mono.TextTemplating</RootNamespace>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
Expand Down
8 changes: 7 additions & 1 deletion dotnet-t4/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ Number | Square | Cube
Alternatively, invoking `t4 powers.tt -c MyApp.Powers` will produce a `powers.cs` file containing the runtime template class, which you can compile into your app and execute at runtime with new parameter values:

```csharp
string powersTableMarkdown = new MyApp.Powers { Max = 10 }.Process();
var template = new MyApp.Powers {
Session = new Dictionary<string, object> {
{ "Max", 10 }
}
};
template.Initialize();
string powersTableMarkdown = template.TransformText();
```

To learn more about the T4 language, see the [Visual Studio T4 documentation](https://learn.microsoft.com/en-us/visualstudio/modeling/writing-a-t4-text-template?view=vs-2022).
Expand Down

0 comments on commit e1a447e

Please sign in to comment.