开发者

T4 templates in VS 2010 Cannot Find Metada file SubSonic.Core.dll

开发者 https://www.devze.com 2023-01-14 17:48 出处:网络
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 err

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开发者_Go百科 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号