代码之家  ›  专栏  ›  技术社区  ›  Anemoia

Visual Studio 2008安装程序,自定义操作。断点未触发

  •  1
  • Anemoia  · 技术社区  · 14 年前

    我有一个自定义操作项目的安装程序。

    当我在事件日志中写入一些内容时,操作就会触发,它工作得非常好。

    但是我真的需要调试文件,因为操作非常复杂。

    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()
            {
    
            }
        }
    }
    

    安装程序只是在没有警告我的情况下完成,它不会中断,也不会要求我附加调试器。

    我试过调试和发布模式。我错过什么了吗?

    谢谢

    -蛇

    1 回复  |  直到 14 年前
        1
  •  1
  •   Anemoia    14 年前

    base.Install 底座。安装 未执行。