VB获取程序部署目录

前端之家收集整理的这篇文章主要介绍了VB获取程序部署目录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. //Get the assembly informationSystem.Reflection.Assembly
  2. assemblyInfo = System.Reflection.Assembly.GetExecutingAssembly();
  3.  
  4. //Location is where the assembly is run from
  5. string assemblyLocation = assemblyInfo.Location;
  6.  
  7. //CodeBase is the location of the ClickOnce deployment files
  8. Uri uriCodeBase = new Uri(assemblyInfo.CodeBase);
  9. string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString());

猜你在找的VB相关文章