【发布时间】:2010-05-31 20:57:35
【问题描述】:
我有一个带有自定义操作项目的安装程序。
我希望在安装时触发该操作。
动作触发,当我在事件日志中写入内容时,它可以完美运行。
但我确实需要调试文件,因为操作非常复杂。
所以我有以下安装程序类:
namespace InstallerActions
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
using System.IO;
[RunInstaller(true)]
// ReSharper disable UnusedMember.Global
public partial class DatabaseInstallerAction : Installer
// ReSharper restore UnusedMember.Global
{
public DatabaseInstallerAction()
{
InitializeComponent();
}
public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
System.Diagnostics.Debugger.Launch();
System.Diagnostics.Debugger.Break();
// none of these work
Foo();
}
private static void Foo()
{
}
}
}
安装程序只是在没有警告我的情况下完成,它没有中断,也没有要求我附加调试器。
我尝试过调试和发布模式。我错过了什么吗?
谢谢
-蛇
【问题讨论】:
标签: visual-studio-2008 setup-project