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

Fix some packaging issues #163

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading