Skip to content

Commit f0950ef

Browse files
committed
Added an option to expose the UseRelativeLinePragmas switch on the generator.
This enables us to (optionally) restore what was the default behaviour prior to v2.3.0. This commit resolves mono#152
1 parent 0053d8d commit f0950ef

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

dotnet-t4/TextTransform.cs

+5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ static int MainInternal (string [] args)
103103
"Preprocess the template into class {<name>} for use as a runtime template. The class name may include a namespace.",
104104
(s) => preprocessClassName = s
105105
},
106+
{
107+
"l|useRelativeLinePragmas",
108+
"Use relative paths in line pragmas.",
109+
s => generator.UseRelativeLinePragmas = true
110+
},
106111
{
107112
"p==|parameter==",
108113
"Set session parameter {0:<name>} to {1:<value>}. " +

dotnet-t4/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Option | Description
6161
`-I=<directory>` | Add a `<directory>` to be searched when resolving included files
6262
`-P=<directory>` | Add a `<directory>` to be searched when resolving assemblies.
6363
`-c`<br/>`--class=<name>` | Preprocess the template into class `<name>` for use as a runtime template. The class name may include a namespace.
64+
`-l`<br/>`--useRelativeLinePragmas` | Use relative paths in line pragmas.
6465
`-p`, `--parameter=<name>=<value>` | Set session parameter `<name>` to `<value>`. The value is accessed from the template's `Session` dictionary, or from a property declared with a parameter directive: `<#@ parameter name='<name>' type='<type>' #>.` <br/> If the `<name>` matches a parameter with a non-string type, the `<value>` will be converted to that type.
6566
`--debug` | Generate debug symbols and keep temporary files.
6667
`-v` <br/> `--verbose` | Output additional diagnostic information to stdout.

0 commit comments

Comments
 (0)