C# - T4 templates in VS 2010 Cannot Find Metada file SubSonic.Core.dll
العربية
български
català
中文
čeština
dansk
Nederlands
eesti
suomi
français
Deutsch
Ελληνικά
עברית
हिंदी
magyar
Bahasa Indonesia
italiano
日本語
한국어
latviešu
lietuvių
norsk
polski
Português
română
русский
slovenčina
slovenski
español
svenska
ไทย
Türkçe
українська
Tiếng Việt
I am using Subsonic 3 to generate DAL. Further I am using T4 templates to generate my BOs from DAL. Subsonic's T4 templates are working properly, but when I run my templates it gives me following error:
Compiling transformation: Metadata file 'SubSonic.Core.dll' could not be found
I have imported SubSonic in my settings.include file like this:
<#@ assembly name="SubSonic.Core.dll" #>
I am referring SubSonic.Core project (I've downloaded code). SubSonic is not installed in GAC, but DAL project is generating code just file like this.
EDIT 1:- If I remove <#@ assembly name="SubSonic.Core.dll" #> it new error crops up:
Compiling transformation: The type or namespace name 'SubSonic' could not be
found (are you missing a using directive or an assembly reference?)
EDIT 2:- I have got solution to this problem by adding <#@ assembly name="SubSonic.Core.dll" #> as suggested in answer to my this question, but that was in VS 2008. Don't know why this is not working in VS 2010.
EDIT 3:- Installed SubSonic.Core.dll to GAC, restarted VS, still getting the freaking error. Should have slept instead.
Answer |
After beating my head against the wall for quite a long time, I installed SubSonic.Core.dll into GAC. Then I removed .dll from
<#@ assembly name="SubSonic.Core.dll" #>
and changed it to
<#@ assembly name="SubSonic.Core" #>
now working fine.