预编译DNN
发布于: http://shiningrise.cnblogs.com/(转载请保留此链接)
DNN预编译后会找不到资源文件
看F:\编程\DNN\DNN4.5.5\DotNetNuke_04.05.05_Source\Library\Components\Localization\Localization.vb文件中的
#Region "Constants"
Friend Const keyConst As String = "resourcekey"
Public Const SystemLocale As String = "en-US"
Public Const SharedResourceFile As String = ApplicationResourceDirectory + "/SharedResources.resx"
Public Const LocalResourceDirectory As String = "App_LocalResources"
Public Const LocalSharedResourceFile As String = "SharedResources.resx"
Public Const ApplicationResourceDirectory As String = "~/App_GlobalResources"
Public Const GlobalResourceFile As String = ApplicationResourceDirectory + "/GlobalResources.resx"
Public Const SupportedLocalesFile As String = ApplicationResourceDirectory + "/Locales.xml"
Public Const TimezonesFile As String = ApplicationResourceDirectory + "/TimeZones.xml"
Public Const SystemTimeZoneOffset As Integer = -480
#End Region
因为App_GlobalResources预编译后就不存在了,但是系统仍然到这个目录下找,当然找不到了.所以出错.
错误描述:
InnerException: 未能找到路径"F:\编程\DNN\DNN4.5.5\PreCompiled\App_GlobalResources\Locales.xml"的一部分。
改: App_GlobalResources ->App_GlobalResourcesFiveYears
Public Const ApplicationResourceDirectory As String = "~/App_GlobalResources"
->
Public Const ApplicationResourceDirectory As String = "~/App_GlobalResourcesFiveYears"
这样就可以预编译成可升级的webapp,但仍不可预编译成不可升级的webapp.
目前搞不定预编译成不可更新部署DNN网站,谁知道,请不吝赐教.