0

I have a WPF application. The client's database file is a .SQLite file and is created during the first run of the application. Also some excel files are also generated during run time. All these files are stored in AppData instead of the root directory. I have given the following path for the database but it still creates the file in AppData folder. System.IO.Directory.GetParent(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\NuEattendance_Faculty.sqlite"

Please help!!!

Shreya
  • 19
  • 5
  • Possible duplicate: http://stackoverflow.com/questions/938421/getting-the-applications-directory-from-a-wpf-application – rmojab63 Feb 15 '17 at 06:33
  • @Ramin I have tried out everything on that post. I can access that directory but I can't write or make new files in that directory. – Shreya Feb 15 '17 at 08:50

1 Answers1

0

My query has been resolved. The application couldn't get the required permission and hence it created the files in AppData folder

Shreya
  • 19
  • 5