- //Get the assembly informationSystem.Reflection.Assembly
- assemblyInfo = System.Reflection.Assembly.GetExecutingAssembly();
- //Location is where the assembly is run from
- string assemblyLocation = assemblyInfo.Location;
- //CodeBase is the location of the ClickOnce deployment files
- Uri uriCodeBase = new Uri(assemblyInfo.CodeBase);
- string ClickOnceLocation = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString());