T4 – <#@ Assembly name="$(SolutionDir)\T4Helper\bin\debug\T4Helper.dll" #>

As mentioned here and here the assembly referencing has changed from VS2008 to VS2010.

Say you have a T4 helper assembly aptly named T4Helper and you have it in a project called… T4Helper.

MySolution
....MyProject
........MyT4Files
........MyOtherFiles
....T4Helper
........T4Source

The VS-macro-way to reference it from  MyProject is

<#@ Assembly name="$(SolutionDir)\T4Helper\bin\debug\T4Helper.dll" #>

It obviously has problems when switching away from debug compile.  But the line above will help you get the backslashes right at least.

Update:
Something with

$(ProjectDir)$(OutDir)

might do the trick.

Leave a Reply