Estou tentando carregar um assembly no template T4, porém ao tentar usar o $(SolutionDir)
o meu assembly não carrega, só funciona se eu colocar o caminho completo.
Assim funciona
<#@ assembly name="d:\Projetos\Meus.Scaffold\bin\Debug\Meus.Scaffold.dll" #>
Assim não funciona
<#@ assembly name="$(SolutionDir)\bin\Debug\Meus.Scaffold.dll" #>
Sem que das duas formas o VS não acusa que não foi possível carregar o assembly, porém ao rodar o comando
Scaffold Triggers Teste Teste -force
Tenho o erro
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