开发者

Using <%@ Assembly %> reference without CopyLocal

I am trying to write a standalone ASPX page (no codebehind) for reasons I won't get into. So I want to have some functions declared in the page. But those functions need to reference assemblies that aren't generally referenced by ASPX pages. This means that I need an <%@ Ass开发者_JAVA百科embly %> reference, as detailed here: http://msdn.microsoft.com/en-us/library/d864zc1k.aspx

And it all works fine if I have my reference to the assembly set to CopyLocal = true. However, it is in my GAC, so I don't want to set it to copy local. But if I don't have the DLL in my /bin folder, the page does not compile due to a bad reference.

What do I have to do to get the <%@ Assembly %> declaration to work against an assembly in the GAC?


Typically assemblies that are in the GAC are referenced in the web.config. Is your assembly referenced in the system.web -> compliation -> assemblies section? If not, adding it should resolve your issue.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜