Skip to content

Commit 8a53aed

Browse files
committed
Updated version number to 1.2.0
1 parent de80b85 commit 8a53aed

18 files changed

Lines changed: 39 additions & 38 deletions

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2020 RdJNL
1+
Copyright 2022 RdJNL
22
All rights reserved
33

44
Latest revision: 19 March 2020

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# T4 Text Templating with .NET 5
2-
The software in this repository allows you to run a T4 template with the .NET 5 runtime. This means you can load .NET Core and .NET 5 assemblies and use .NET 5 libraries. My team uses it to generate C# code for types in a .NET Core 3.1 assembly (using Reflection). We also use it to process a JSON file using .NET 5's System.Text.Json library.
1+
# T4 Text Templating with .NET 6
2+
The software in this repository allows you to run a T4 template with the .NET 6 runtime. This means you can load .NET Core and .NET 5/6 assemblies and use .NET 6 libraries. My team uses it to generate C# code for types in a .NET Core 3.1 assembly (using Reflection). We also use it to process a JSON file using .NET 6's System.Text.Json library.
33

44
__Author:__ RdJNL
55

66
## Latest release
7-
Version 1.1.1 can be downloaded [here](https://github.com/RdJNL/TextTemplatingCore/releases/download/v1.1.1/TextTemplatingCore_v1.1.1.zip).
7+
Version 1.2.0 can be downloaded [here](https://github.com/RdJNL/TextTemplatingCore/releases/download/v1.2.0/TextTemplatingCore_v1.2.0.zip).
88

99
## Requirements
10-
- .NET 5
10+
- .NET 6
1111
- .NET Framework 4.8
12-
- Visual Studio 2019 (for the VS extension)
12+
- Visual Studio 2019/2022 (for the VS extension)
1313

1414
## How to use it
1515

16-
### Visual Studio 2019 extension
16+
### Visual Studio 2019/2022 extension
1717
- The extension is provided as a VSIX file. Run this file to install the extension to Visual Studio. You may need to use an elevated command prompt to run the file as admin.
1818
- Once the extension is installed, open your solution in Visual Studio.
1919
- Select the `.tt` file in the Solution Explorer, right click it and click properties.
@@ -23,21 +23,23 @@ Version 1.1.1 can be downloaded [here](https://github.com/RdJNL/TextTemplatingCo
2323
### TextTransformCore executable
2424
To use the executable, simply run it from the command line. Provide as first and only argument the path to the template file. If the path has spaces in it, makes sure to surround it with double quotes (`"`).
2525

26-
## Limitations
26+
## Differences with Visual Studio's T4 processor
2727
There are several limitations to this approach:
2828
- The hostspecific setting __must__ be false.
2929
- No debugging.
3030
- No template parameters.
3131
- The VS extension cannot be used in database projects (this seems to be a bug in Visual Studio).
3232

33-
## Extra feature
3433
This processor has one feature that Visual Studio's processor does not have:
3534
- From a T4 template, you can access the `TemplateFile` string property to get the absolute path to the template file.
3635

36+
There is one other difference with Visual Studio's processor:
37+
- When running a template using the VS extension, relative paths in assembly directives are relative to the T4 template file, rather than to the solution directory. To provide a path relative to the solution directory, use the `$(SolutionDir)` environment variable.
38+
3739
## How does it work?
3840
The following steps are followed to process the T4 template:
3941
- .NET Framework 4.8 code (either the VS extension or the TextTransformCore executable) uses Visual Studio's T4 template processor to preprocess the template into C# code. This C# code is saved to a temporary file.
40-
- The .NET Framework code runs a .NET 5 executable which compiles the C# code and runs it. The result is once again saved to a temporary file.
42+
- The .NET Framework code runs a .NET 6 executable which compiles the C# code and runs it. The result is once again saved to a temporary file.
4143
- The .NET Framework code loads the content of the temporary file and either passes it to Visual Studio (the VS extension) or saves it to the output file (the TextTransformCore executable).
4244

4345
## License

TemplateExecute/LibraryLoadContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//---------------------------------------------//
2-
// Copyright 2020 RdJNL //
2+
// Copyright 2022 RdJNL //
33
// https://github.com/RdJNL/TextTemplatingCore //
44
//---------------------------------------------//
55
using System;

TemplateExecute/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//---------------------------------------------//
2-
// Copyright 2020 RdJNL //
2+
// Copyright 2022 RdJNL //
33
// https://github.com/RdJNL/TextTemplatingCore //
44
//---------------------------------------------//
55
using System;

TemplateExecute/TemplateExecute.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Authors>RdJNL</Authors>
1010
<Company>RdJNL</Company>
1111
<Product>TemplateExecute</Product>
12-
<Copyright>Copyright 2020 RdJNL</Copyright>
12+
<Copyright>Copyright 2022 RdJNL</Copyright>
1313
</PropertyGroup>
1414

1515
<ItemGroup>

TextTemplatingCoreLib/TemplateError.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//---------------------------------------------//
2-
// Copyright 2020 RdJNL //
2+
// Copyright 2022 RdJNL //
33
// https://github.com/RdJNL/TextTemplatingCore //
44
//---------------------------------------------//
55
namespace RdJNL.TextTemplatingCore.TextTemplatingCoreLib

TextTemplatingCoreLib/TemplateException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//---------------------------------------------//
2-
// Copyright 2020 RdJNL //
2+
// Copyright 2022 RdJNL //
33
// https://github.com/RdJNL/TextTemplatingCore //
44
//---------------------------------------------//
55
using System;

TextTemplatingCoreLib/TextTemplatingCoreLib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Authors>RdJNL</Authors>
88
<Company>RdJNL</Company>
99
<Product>TextTemplatingCoreLib</Product>
10-
<Copyright>Copyright 2020 RdJNL</Copyright>
10+
<Copyright>Copyright 2022 RdJNL</Copyright>
1111
</PropertyGroup>
1212

1313
<ItemGroup>

TextTemplatingCoreLib/TextTemplatingHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//---------------------------------------------//
2-
// Copyright 2020 RdJNL //
2+
// Copyright 2022 RdJNL //
33
// https://github.com/RdJNL/TextTemplatingCore //
44
//---------------------------------------------//
55
using System;

TextTemplatingFileGeneratorCore/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2020 RdJNL
1+
Copyright 2022 RdJNL
22
All rights reserved
33

44
More information about this application is available at https://github.com/RdJNL/TextTemplatingCore.

0 commit comments

Comments
 (0)