[英]My ASP.NET Web Application cannot 'find' any of my classes in the App_Code folder ..?
[英]ASP.Net Library name conflict between Ektron app_code and library
我有一个Ektron 8.2网站,我试图将Quartz.NET集成到其中,以便进行一些调度。 Quartz.NET需要一个库Common.Logging。 该库引入了冲突并破坏了App_Code / VBCode中的Ektron代码。
例如,Utilities.vb中的以下代码
Case Is = Common.EkEnumeration.FolderType.Community
imageURL &= "images/ui/icons/folderCommunity.png"
Case Common.EkEnumeration.FolderType.Catalog
imageURL &= "images/ui/icons/folderGreen.png"
现在给出了编译时错误-
App_Code\VBCode\Utilities.vb(703,0): error BC30456: 'EkEnumeration' is not a member of 'Common'.
似乎Common.Logging与Ektron.Cms.Common冲突(Ektron文件具有Imports Ektron.Cms
语句)。 是否可以指定库的优先级? 还是命名空间导入的库?
更新 Utilities.vb代码由Ektron编写。 我想对此代码不做任何更改,或进行最少的更改,因为任何更改都需要在Ektron升级后重新进行。 这实际上是2个库之间的冲突-Ektron和Quartz.Net。 我可以在不更改任何一个库代码的情况下解决此冲突吗? 别名库是否有配置设置?
一个简单的解决方案是使用完整的命名空间Ektron.Cms.Common.EkEnumeration,而不是依靠include来自动整理内容。
即
Case Is = Ektron.Cms.Common.EkEnumeration...
不优雅,但是应该让您重新工作。
另一种选择是使用名称空间别名 :
using EkCommon = Ektron.Cms.Common;
因此,您的代码将改为:
EkCommon.EkEnumeration.FolderType.Community
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.