VB获取程序部署目录

来源:互联网 发布:程序员联合开发网注销 编辑:程序博客网 时间:2024/06/05 04:29
//Get the assembly informationSystem.Reflection.AssemblyassemblyInfo = System.Reflection.Assembly.GetExecutingAssembly();//Location is where the assembly is run from string assemblyLocation = assemblyInfo.Location;//CodeBase is the location of the ClickOnce deployment filesUri uriCodeBase = new Uri(assemblyInfo.CodeBase);string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString());
0 0
原创粉丝点击