In my t4 template file, I have the following line which definitely will break in build mode.
<#@ assembly name="$(SolutionDir)\MYNAMESPACE.MYLIBRARY\bin\debug\MYLIBRARY.dll"> #>
In order to run this template from my asp.net web project, I have to hard code bin\debug in the above path.
Originally I had the following line,
<#@ assembly name="$(SolutionDir)\MYNAMESPACE.MYLIBRARY\$(OutDir)\MYLIBRARY.dll"
>
but having (OutDir) did not work because my web project outpath is bin\ folder and it kept looking for MYLIBRARY.DLL in bin folder as opposed to bin\debug folder. and I got the following error:
Compiling transformation: Metadata file mynamespace.mylibrary\bin\mylibrary.dll' could not be found
I can not update my web project output path property to bin\debug as opposed to bin\ because then the web project just would not run as explained in the article.
Q.. how can I get rid of hard coded bin\debug path in t4 template file??