If I correctly understood your question, try to use Application.StartupPath
and ApplicationDeployment.CurrentDeployment.DataDirectory
as follows:
string startupPath = ApplicationDeployment.IsNetworkDeployed
? ApplicationDeployment.CurrentDeployment.DataDirectory :
: Application.StartupPath;
Or just Application.StartupPath
.
Or just ApplicationDeployment.CurrentDeployment.DataDirectory
.
It depends on the meaning of the "Clickonce puts sub-folders of a project"