我有一个自定义操作项目的安装程序。
当我在事件日志中写入一些内容时,操作就会触发,它工作得非常好。
但是我真的需要调试文件,因为操作非常复杂。
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()
{
}
}
}
安装程序只是在没有警告我的情况下完成,它不会中断,也不会要求我附加调试器。
我试过调试和发布模式。我错过什么了吗?
谢谢
-蛇