0

I want to be able to reference an assembly in a T4 template but I don't want to bind myself to the debug/release mode version of it.

I tried to use the following to include my assembly:

<#@ assembly name="..\..\OtherAssy\bin\$(Configuration)\OtherAssy.dll" #>

but this throws an error saying it cant find the dll.

Can I use the Configuration property to get the configuration mode e.g. debug/release? Or am I barking up the wrong tree?

Richard Hooper
  • 809
  • 1
  • 12
  • 27

1 Answers1

0

Yes you can, (for transforms within the IDE at least), but your relative path won't work, as T4's 'current' directory isn't the project folder but rather VS's installation folder.

So if you use $(SolutionDir) or $(ProjectDir) you should be good to go.

Incidentally, the full list of variables is here on MSDN

GarethJ
  • 6,496
  • 32
  • 42
  • Thanks for that. I did try that but I think there must have been another error in the T4 at the same time that threw me!!! Got that working now. – Richard Hooper Sep 02 '13 at 15:11