I'm trying to load an assembly into the template T4, however when trying to use $(SolutionDir)
my assembly does not load, it only works if I put the full path.
This works
<#@ assembly name="d:\Projetos\Meus.Scaffold\bin\Debug\Meus.Scaffold.dll" #>
This does not work
<#@ assembly name="$(SolutionDir)\bin\Debug\Meus.Scaffold.dll" #>
In both ways, VS does not acknowledge that assembly could not be loaded, but when you run the
Scaffold Triggers Teste Teste -force
I have the error
Add-ProjectItemViaTemplate : d:\Projetos\Projeto.Web\CodeTemplates\Scaffolders\Trigger\ConexaoTriggerDelete.cs.t4(3,11) : error CS0246: Compiling
transformation: The type or namespace name 'Meus' could not be found (are you missing a using directive or an assembly reference?)
At d:\Projetos\Projeto.Web\CodeTemplates\Scaffolders\Trigger\Trigger.ps1:15 char:1
+ Add-ProjectItemViaTemplate $outputPath -Template $Template '
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-ProjectItemViaTemplate], Exception
+ FullyQualifiedErrorId : T4Scaffolding.Cmdlets.AddProjectItemViaTemplateCmdlet