Создал Install class
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Diagnostics;
namespace ElZakaz
{
[RunInstaller(true)]
public partial class InstallerElZakaz : Installer
{
public InstallerElZakaz()
{
InitializeComponent();
}
public override void Install(IDictionary savedState)
{
Debugger.Break();
base.Install(savedState);
// Uses reflection to find the location of the config file.
// Здесь пытаюсь поставить точку останова , но проскакиваю
System.Reflection.Assembly Asm = System.Reflection.Assembly.GetExecutingAssembly();
System.IO.FileInfo FileInfo = new System.IO.FileInfo(Asm.Location + ".config");
if (!FileInfo.Exists) throw new InstallException("Missing config file");
//Loads the config file into the XML DOM.
System.Xml.XmlDocument XmlDocument = new System.Xml.XmlDocument();
XmlDocument.Load(FileInfo.FullName);
}
}
}
|
Пытаюсь запустить из Setup проекта - но никаких результатов.
Как мне правильно оттестировать инсталяцию проекта ?