C# 自定义安装程序类中的System.Configuration
我有一个.NET2.0项目winforms应用程序。我有另一个安装程序项目 我已经向winforms应用程序添加了一个自定义安装程序类,我希望在安装MSI运行期间提取一些应用程序配置值以显示/允许用户更改 我试着使用这个例子,因为它有很好的文档记录,而且很有意义: 我遇到的问题是那个系统。配置没有给我配置对象。我有以下代码:C# 自定义安装程序类中的System.Configuration,c#,windows-installer,C#,Windows Installer,我有一个.NET2.0项目winforms应用程序。我有另一个安装程序项目 我已经向winforms应用程序添加了一个自定义安装程序类,我希望在安装MSI运行期间提取一些应用程序配置值以显示/允许用户更改 我试着使用这个例子,因为它有很好的文档记录,而且很有意义: 我遇到的问题是那个系统。配置没有给我配置对象。我有以下代码: using System; using System.Collections; using System.Collections.Generic; using Syste
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Configuration;
namespace BadgeReader
{
[RunInstaller(true)]
public partial class InstallerSettings : System.Configuration.Install.Installer
{
public InstallerSettings()
{
InitializeComponent();
}
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
//get the custom settings
//System.Diagnostics.Debugger.Break();
System.Configuration
//Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
}
}
}
我正试图让最后一行评论行工作,但它不工作。。。我不确定我做错了什么。添加对System.Configuration.dll的引用哦,天哪。我发誓是我干的。我发誓我已经查过了。。。。我发誓我看了又看。