2010-09-05 30 views
1

我正在使用Subsonic 3生成DAL。此外,我正在使用T4模板從DAL生成我的BO。亞音速的T4模板均工作正常,但是當我跑我的模板,它給了我以下錯誤:VS 2010中的T4模板無法找到Metada文件SubSonic.Core.dll

Compiling transformation: Metadata file 'SubSonic.Core.dll' could not be found 

我在settings.include文件導入亞音速這樣的:

<#@ assembly name="SubSonic.Core.dll" #> 

我指SubSonic.Core項目(我已經下載了代碼)。 SubSonic未安裝在GAC中,但DAL項目正在生成如此的代碼。

編輯1: - 如果我刪除<#@ assembly name="SubSonic.Core.dll" #>它新的錯誤影響了:

Compiling transformation: The type or namespace name 'SubSonic' could not be 
found (are you missing a using directive or an assembly reference?) 

編輯2: - 我已經加入<#@ assembly name="SubSonic.Core.dll" #>在回答表明我this的問題得到了解決這個問題,但是在VS 2008.不知道爲什麼這是不是在VS 2010工作。

編輯3: - 安裝SubSonic.Core.dll到GAC,重新啓動VS,仍然得到驚人的錯誤。應該睡覺了。

+0

@亨克有一個鏈接到我得到第一個解決方案的問題。 – TheVillageIdiot 2010-09-05 18:59:48

+0

它實際上是說「SubSonc.Core.dll」,還是「SubSonic.Core.dll」? – JasonFruit 2010-09-05 19:18:30

回答

2

經過很長一段時間我的頭撞牆後,我將SubSonic.Core.dll安裝到GAC中。然後,我從

<#@ assembly name="SubSonic.Core.dll" #> 

.dll文件刪除,改成了

<#@ assembly name="SubSonic.Core" #> 

現在工作的罰款。