ICEM02

ICEM02 验证所有模块依赖项和排除项是否与当前模块相关。

合并模块 ICE 存储在名为 Mergemod.cub 的合并模块 .cub 文件中,而不是存储在包含用于包验证的 ICE 的 .cub 文件中。

结果

如果模块数据库试图指定与当前模块无关的依赖项或排除项,ICEM02 会发布错误消息。 如果模块数据库试图将当前模块指定为相关模块或被自身排除的模块,ICEM02 会发布一条错误消息。

示例

对于包含如下所示数据库条目的模块,ICEM02 会发布以下错误消息。

The dependency OtherModule.GUID2.1033.OtherModule.GUID3.0 in the 
ModuleDependency table creates a dependency for an unrelated module. A 
module can only define dependencies for itself

This module is listed as depending on itself!

The exclusion OtherModule.GUID2.1033.OtherModule.GUID3.0 in the 
ModuleExclusion table creates an excluded module for an unrelated 
module. A module can only define exclusions for itself.

This module excludes itself from the target database!

ModuleSignature 表

ModuleID 语言 版本
MyModule.GUID1 2052 1.0

 

ModuleDependency 表

ModuleID ModuleLanguage RequiredID RequiredLanguage RequiredVersion
OtherModule.GUID2 2052 OtherModule.GUID3 0 1.0
MyModule.GUID1 2052 MyModule.GUID1 2052 1.2

 

ModuleExclusion 表(部分)

ModuleID ModuleLanguage ExcludedID ExcludedLanguage
OtherModule.GUID2 2052 OtherModule.GUID3 0
MyModule.GUID1 2052 MyModule.GUID1 2052

 

合并模块 ICE 会发布第一个错误,因为 ModuleDependency 表中的第一行没有为 ModuleSignature 表中指定的当前模块指定必需的依赖项。 模块的依赖项只能在它自己的 ModuleDependency 表中指定。 如果当前模块需要 OtherModule.GUID3,请将该行的前两列替换为 ModuleSignature 表中的数据。 如果此模块不需要 OtherModule.GUID3,请删除此行。

合并模块 ICE 会发布第二个错误,因为模块无法指定对自身的依赖。

合并模块 ICE 会发布第三个错误,因为 ModuleExclusion 表中的第一行没有为 ModuleSignature 表中指定的当前模块指定必需的排除项。 模块的排除项只能在它自己的 ModuleExclusion 表中指定。 如果当前模块排除了 OtherModule.GUID3,请将该行的前两列替换为 ModuleSignature 表中的数据。 如果当前模块未排除 OtherModule.GUID3,则删除此行。

合并模块 ICE 会发布第四个错误,因为模块无法指定自己排除自身。

合并模块 ICE 参考