安装自己基于4.8.2开发模块到4.8.4的版本后出现的错误
Warning Install aborted - The module being installed is not compatible with your host application version ( an upgrade is required )
但是同时开发了几个模块,其他却行
追踪了下代码,发现DNN比较模块与框架之间的兼容性是通过以下代码来实现的 :
Protected Function ValidateCompatibility(ByVal Folder As PaFolder) As Boolean
' check core framework compatibility
If Folder.CompatibleVersions <> "" Then
Try
Dim objMatch As Match
objMatch = Regex.Match(glbAppVersion, Folder.CompatibleVersions, RegexOptions.IgnoreCase Or RegexOptions.Singleline)
If objMatch Is Match.Empty Then
Return False
Else
Return True
End If
Catch ' RegExp expression is not valid
Return False
End Try
End If
Return True
End Function
也就是查看模块定义中的<compatibleversions></compatibleversions>中是否包含当前dnn框架的版本号。如果compatibleversions节点内容为空,则表示兼容所有版本。