构建安装项目,错误1001(自定义操作出错)

时间:2012-08-19 09:35:48

标签: c# windows-installer

非常喜欢这个。这不是我第一次建立设置 - 从未见过这样的事情......

基本上,只要我添加自定义操作并尝试安装,我就会收到此错误。

bummer http://s11.postimage.org/44n8woppf/Untitled.png

我确实有一个包含所有必需代码字段的安装程序类,它与我以前的安装程序类中使用的字段相同。

[RunInstaller(true)]
public partial class Installer : System.Configuration.Install.Installer
{


    public Installer()
    {
        InitializeComponent();
    }

    public override void Commit(IDictionary savedState)
    {
        base.Commit(savedState);
        // Do some work on commit 
    }
...

来自Fuselogvw:

*** Assembly Binder Log Entry  (19/08/2012 @ 11:57:09) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\syswow64\MsiExec.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\SYSTEM
LOG: Where-ref bind. Location = C:\Program Files (x86)\OrScanTechnologies\CamerasCalibrationApp\CamCalibApplication.exe
LOG: Appbase = file:///C:/Windows/syswow64/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MsiExec.exe
Calling assembly : (Unknown).
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Users\-\AppData\Local\Temp\CFGB105.tmp
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/OrScan Technologies/CamerasCalibrationApp/CamCalibApplication.exe.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files (x86)\OrScan Technologies\CamerasCalibrationApp\CamCalibApplication.exe
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: CamCalibApplication, Version=1.5.2.2, Culture=neutral, PublicKeyToken=null
LOG: Re-apply policy for where-ref bind.
LOG: Where-ref bind Codebase does not match what is found in default context. Keep the result in LoadFrom context.
LOG: Binding succeeds. Returns assembly from C:\Program Files (x86)\OrScan Technologies\CamerasCalibrationApp\CamCalibApplication.exe.
LOG: Assembly is loaded in LoadFrom load context.

来自fuselogvw的更多信息 more http://s13.postimage.org/hqn04w1bb/Untitled2.png

3 个答案:

答案 0 :(得分:1)

对Google Installer XML(WiX)部署工具基础(DTF)自定义操作进行Google搜索。这是托管代码自定义操作的黄金标准,将消除1001错误消息。

那就是说,一定不要重新发明轮子。始终使用本机Windows Installer标准表和操作,而不是滚动自己的进程外自定义操作。

答案 1 :(得分:0)

有时,这种错误是由项目平台目标配置不匹配引起的。检查所有解决方案项目是否为AnyCPU / x64 / x86(无论您喜欢它们是什么)。

答案 2 :(得分:0)

解决方案是添加2个opencv dll文件,这些文件不会以某种方式添加为依赖项。完成了这个伎俩。