Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClickOnce deployment location

Tags:

.net

clickonce

We have some special requirements:

  1. From our application, launch a ClickOnce application. It will download ClickOnce app to user's cache.
  2. After it's done, the main app needs to access some file downloaded into ClickOnce app folder.

Is there any way for the main app to know the location of ClickOnce installation folder?

Thanks, yyff

like image 778
yyff Avatar asked Sep 23 '09 18:09

yyff


People also ask

Where does a ClickOnce application get installed?

Every ClickOnce application installed on a local computer has a data directory, stored in the user's Documents and Settings folder. Any file included in a ClickOnce application and marked as a "data" file is copied to this directory when an application is installed.

What is ClickOnce deployment?

ClickOnce is a deployment technology that enables you to create self-updating Windows-based applications that can be installed and run with minimal user interaction.

What is ClickOnce application deployment manifest?

A deployment manifest is an XML file that describes a ClickOnce deployment, including the identification of the current ClickOnce application version to deploy. Deployment manifests have the following elements and attributes. Element. Description. Attributes.

What port does ClickOnce use?

Select the Add Port button. Enter a Name and the Port Number 58724.


1 Answers

You can do this by examining the executing assembly and retrieving the location.

System.Reflection.Assembly assm = System.Reflection.Assembly.GetExecutingAssembly();

This is the location of your ClickOnce deployment. --> assm.CodeBase

like image 100
RobinDotNet Avatar answered Sep 25 '22 14:09

RobinDotNet