2
我正在爲我的對象模型中的特定實體添加一個基類。爲此我也跟着樣品中的以下鏈接:解決從DomainModelTemplate類型的問題
http://drc.ideablade.com/devforce-2012/bin/view/Documentation/model-custom-base-class
http://drc.ideablade.com/devforce-2012/bin/view/Documentation/custom-code-generation-template
我* .TT文件長相酷似與大會第一個鏈接的例子包括在第二鏈路上市。
目前,我得到兩個錯誤編譯轉型:
Compiling transformation: The type or namespace name 'EntityOrComplexTypeWrapper' could not be found (are you missing a using directive or an assembly reference?)
Compiling transformation: The type or namespace name 'EntityTypeWrapper' could not be found (are you missing a using directive or an assembly reference?)
你可以提供任何幫助解決這個問題?
你打敗了我,因爲我正要回答。當我們添加對EF 5和6的支持時,我們將IdeaBlade.VisualStudio.OM.CodeGenerator分解爲2個程序集,因此它包含了解決問題的IdeaBlade.VisualStudio.OM.CodeGenerator.EF5.dll程序集引用。我會更新文檔 - 謝謝! – 2015-02-25 17:08:10
在我開始自定義模板之前,已經引用了IdeaBlade.VisualStudio.OM.CodeGenerator.EF5.dll。無論出於何種原因,它將整個名稱空間提供給解決問題的類。 – Matt 2015-02-25 18:33:44
啊,謝謝,我們當時也做了一些命名空間變更。那麼,爲時已晚,但我們的文檔頁面已更正。 :) – 2015-02-25 19:41:46