2010-12-02 42 views
0

我有我使用MySQL的活動記錄模板,並在VS2008的工作完全一個VS2005的Web應用程序,但是我得到這個錯誤:亞音速T4 TextTemplatingService異常2005

Custom tool error: An Exception was thrown while running the transformation code. The process cannot continue. The following Exception was thrown: 
System.Runtime.Serialization.SerializationException: Type 'Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService' in Assembly 'Microsoft.VisualStudio.TextTemplating.VSHost, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable. 

查看完整異常詳細信息: http://pastebin.com/rF8iQJW2

我已經安裝了下列軟件包,使之成爲VS2005工作:

​​ 指導自動化工具包Visua升Studio的2005年 - 2008年2月發佈

http://goo.gl/OEUNP 指導自動化擴展 - 2008年2月發佈

+0

Subsonic 3.0不適用於VS2005,因爲它需要.NET框架3.5 – 2010-12-03 04:59:59

回答

0

亞音速3.0不爲VS2005,因爲它需要.NET Framework 3.5的

0

以前的答案是不正確的工作。 T4系統現在用完了,並將一個Ipc通道設置回主機。此傳輸通道(基於遠程處理)使用二進制序列化程序,並且無法通過該通道傳輸Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService,因爲它沒有標記爲可序列化,完全如異常消息所述。

通過更改模板指令hostspecific =「true」並訪問「主機」屬性,您可以輕鬆地訪問此服務。

也有一些EnvDTE.DTE部分無法通過T4模板訪問,原因相同(如DTE.Windows或DTE.WindowConfiguration)。