Closed gary-lg closed 2 years ago
Thanks for the compliments and the feedback. When I have some time I'll try to fix this difference. If I can, I want to keep the behavior of this tool similar to the original one.
I've looked at this again and have decided to keep the current behavior (paths relative to T4 file). However, you can use $(SolutionDir)
at the start of the path to provide a path relative to the solution directory.
Just wanted to leave a note of appreciation - I came across this project from .Net Core issue 2000 and it has put an end to messy devenv.config binding redirects.
The only thing I noticed which was quick to fix is that using the
<@ assembly
directive takes a path relative to the TT file. With vanilla T4 the path is relative to the solution. For example if we had the folder structure:and are writing the template in the context of myGenerated.tt, in vanilla T4 we would use:
<#@ assembly name="src/SomeLibrary/bin/debug/net5.0/SomeLibrary.dll" #>
in TextTemplatingCore we use:
<#@ assembly name="../../SomeLibrary/bin/debug/net5.0/SomeLibrary.dll" #>
Might be worth calling that out in the docs (or not, I'm not your boss)
Thanks again for a great tool