TextTemplateでカスタムTYPEを使用して(T4)ながら:エラー
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcApplication2.Models;
namespace MvcApplication2
{
public class EntityAttribute
{
public string Name { get; set; }
}
public class Entity
{
public List<EntityAttribute> Attributes { get; set; }
public string Name { get; set; }
}
public class Class1
{
public static string getTable()
{
return "tbl";
}
}
}
を私は、テキストテンプレートファイル.ttを持っています:
<#@ template debug="true" language="C#" #>
<#@ output extension=".cs" #>
<#@ assembly name="$(SolutionDir)\MvcApplication2\bin\MvcApplication2.dll" #>
<#@ import namespace="MvcApplication2" #>
<#
string s = Class1.getTable();
#>
私はTextTemplate上CustomToolを実行すると、私は次のエラーを取得する:
Error 2 Compiling transformation: Metadata file 'MvcApplication2.dll' could not be found C:\Users\Igor\Documents\Visual Studio 2010\Projects\MvcApplication2\MvcApplication2\TextTemplate1.tt 1 1 MvcApplication2
WHE "<#@アセンブリ名=" MvcApplication2.dll "#>"フルパス "<#@アセンブリ名=" C:¥Users¥Igor¥Documents¥Visual Studio 2010¥Projects¥MvcApplication2¥MvcApplication2 \ binにMvcApplication2.dll \ "#>"
私は次のエラーを取得する:
Error 2 Compiling transformation: 'MvcApplication2.Class1' does not contain a definition for 'getTable' c:\Users\Igor\Documents\Visual Studio 2010\Projects\MvcApplication2\MvcApplication2\TextTemplate1.tt 8 20
どこに間違いがある?? ありがとうございました
にツールボックスをダウンロードすることができます関連t4mvcタグを削除してくださいあなたが使用していない特定のツールに –
あなたはもっと具体的に何をすべきですか?ありがとうございました – theateist