.net 使用Al.exe创建附属程序集

.net 使用Al.exe创建附属程序集,.net,localization,resources,satellite-assembly,.net,Localization,Resources,Satellite Assembly,我正在尝试使用Al.exe创建附属程序集 要从.resources文件创建程序集,我将执行以下命令: al.exe /c:<culture> /out:<output dll name> /embedresource: <name of the .resources file> /fileversion:3.1.5.0 /productv:3.1.5.0 /keyf:Key.snk al.exe/c:/out:/embedresource:/filevers

我正在尝试使用Al.exe创建附属程序集

要从
.resources
文件创建程序集,我将执行以下命令:

al.exe /c:<culture> /out:<output dll name> /embedresource: <name of the .resources file> /fileversion:3.1.5.0 /productv:3.1.5.0 /keyf:Key.snk
al.exe/c:/out:/embedresource:/fileversion:3.1.5.0/productv:3.1.5.0/keyf:Key.snk
第一个问题:

fileversion、productv和keyf是否必须与部署的应用程序的文件版本、产品版本和密钥相同

第二个问题:

为什么当我将生成的DLL部署到GAC时,版本列变成了0.0.0.0?但是当我在GAC中查看它们的属性时,为什么文件版本和产品版本是正确的,而版本字段是0.0.0.0


非常感谢。

对问题1的回答:

似乎文件版本、产品版本和密钥必须与部署的应用程序相同,否则卫星Dll将不可见,应用程序将使用默认资源Dll


对问题2的回答:

版本为0.0.0.0,因为在使用Al.exe时,是一个
/v
选项,必须在文件和产品版本之外指定该选项

最佳方法:

最好的方法是使用
/template
选项,而不是单独指定版本、文件版本和产品版本,以便新创建的程序集可以从应用程序程序集继承正确的清单