Problem with deployment of windows application using setup wizard.
- by Mike
I have some xml files, which are used in my application. They are stored in the same folder with application , in subfolder DATA: "C:\MyProject\DATA\".
To get the DATA folder path i use this code :
static public string GetDataFolderPath()
{
string s = System.IO.Directory.GetCurrentDirectory().Replace(@"\bin\Debug", "");
int i = s.LastIndexOf(@"\");
s = s.Substring(0, i);
i = s.LastIndexOf(@"\");
s= s.Substring(0, i);
return s + @"\Data\";
}
So when i want to deploy my application, i create a setup project, and add the DATA folder to Application folder. But after i install the program f.e. "C:\Project"(DATA folder- "C:\Project\DATA" i got the error: "folder C:\DATA is not found".
What i need to change to make things working after deployment. Why it looks for the DATA folder on 1 level higher?