我为wix安装程序创建了一个Wix CustomActions项目。我正在使用MakeSfxCA.exe生成CustomActions.XXXX.CA.dll。
由于我将多个dll用作支持文件,因此在下面,我在SupportFile中添加了2个新的dll参考。
<MakeSfxCA
InputCustomActionAssembly="MyRef.CustomActions.xxxx.dll"
TargetCustomActionAssembly="MyRef.CustomActions.xxxx.CA.dll"
UnmanagedProxyAssembly="SfxCA.dll"
ManagedProxyAssembly="someDLLname"
ManagedProxyClass="someCLASSname">
<SupportFile source="Microsoft.Deployment.WindowsInstaller.dll" target=""/>
<SupportFile source="ExistingDLL1.dll" target=""/>
<SupportFile source="ExistingDLL2.dll" target=""/>
<SupportFile source="NewlyAdded1.dll" target=""/>
<SupportFile source="NewlyAdded2.dll" target=""/>
</MakeSfxCA>
构建此CustomActions项目并构建日志显示时,一切都很好
Packaging files
1> MyRef.CustomActions.xxxx.dll
1> Microsoft.Deployment.WindowsInstaller.dll
1> ExistingDLL1.dll
1> ExistingDLL2.dll
1> NewlyAdded1.dll
1> NewlyAdded2.dll
1> CustomAction.config
成功生成安装程序后,在安装此安装程序时,出现异常,
System.IO.FileNotFoundException: Could not load file or assembly 'NewlyAdded2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c34r7789g45367gb' or one of its dependencies. The system cannot find the file specified.
在调试时,运行安装程序时,在C:\ Windows \ Installer \ MSI76CD.tmp-中找不到此NewlyAdded2.dll。安装过程中将临时创建“ MSI76CD.tmp-”。所有dll的.net框架版本都相同。