我已經在可以添加程序集引用的T4MVC模板文件(.tt)中找到最靠近頂部的位置,像:如何從t4mvc模板(.tt)添加不在GAC中的程序集的引用
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Collections.Generic" #>
但是,似乎我只能引用GAC中的程序集。也就是說,如果我有一個裝配MyProject.Stuff.dll(不是在GAC)添加到包含模板的VS項目的引用,然後我希望能夠添加類似以下內容:
<#@ assembly name="MyProject.Stuff" #>
<#@ import namespace="MyProject.Stuff" #>
如果我做到這一點,然後我得到以下錯誤:
Error 1 Compiling transformation: Metadata file 'MyProject.Stuff' could not be found C:\Work\Development\DotNetSolution\MyProject\Utils\T4MVC\T4MVC.tt 1 1
如何添加對不在GAC中的程序集的引用?
這是2008年還是2010年? – 2010-05-14 22:55:53