VS05自带打包功能(virusplayer )
这两天,照着网上弄了个网站打包的小程序:连接数据库,指定虚拟目录
也增加了自定义操作,可安装过程中自己写的窗口并没有弹出来,不知道是什么原因,向大家请教,也希望virusplayer来看看
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
Form1 fr = new Form1();
if (fr.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
try
{
XmlDocument xmldocument = new XmlDocument();
xmldocument.Load(Path.Combine(getpath(), "Web.config"));
//'查找到appsettings中的节点
//XmlNode node=new XmlNode();
bool FoundIt = false;
XmlNodeList nodes = xmldocument.SelectSingleNode("/configuration/connectionStrings").ChildNodes;
foreach (XmlNode node in nodes)
{
if (node.Name == "add")
{
if (node.Attributes["name"].Value == "myconnString")
{
//'写入连接字符串
node.Attributes["connectionString"].Value = String.Format("Data Source={0};User ID={1};pwd={2};Initial Catalog={3}",
fr.DbServer, fr.LoginName, fr.Password, fr.Db);
FoundIt = true;
xmldocument.Save(Path.Combine(getpath(), "Web.config"));
}
}
}
if (!FoundIt)
{
throw new ApplicationException("Web.Config 文件没有包含connectionString连接字符串设置");
}
else
{
CreateVirtualDir(fr.SiteName, this.Context.Parameters[""]);
}
}
catch (Exception ex)
{
throw ex;
}
}
else
{
throw new ApplicationException("应用程序数据库安装失败");
}
}也增加了自定义操作,可安装过程中自己写的窗口并没有弹出来,不知道是什么原因,向大家请教,也希望virusplayer来看看
...全文
相关推荐
VS08ToVS05工具
VS08ToVS05工具 VS08ToVS05工具 VS08ToVS05工具 详细说明见:http://www.our-code.com/news/2009124/n19515.html
vs05单表代码生成器
针对单表操作,采用三层编码。其中的代码可以参考,如果你感兴趣,可以研究。
OPC_简单Client——Vs05
自己练习的使用OPC2.0连接开物组态软件的一个OPC Client
VS2010插件(05 08也是一样的代码)
VS2010插件(05 08也是一样的代码) http://topic.csdn.net/u/20110413/17/49b7e1fb-3de0-439d-abad-194961d83ca7.html
log4plus开源日志源文件,支持VS05
已经将vs 05下编译通过,因为先用的log4cpp,在vs05中经常出问题,改用了log4plus,目前好多都已经不支持老版本的vs了,新版本 的话建议用log4cpp,毕竟可设置的功能多了一些,想要的可见我下一个贴子


