c# - AppDomain.CurrentDomain.BaseDirectory changes according to the app's target platform -
i have path set path root dir of application.
worked until decided change system.data.sqlite.dll
lib , application 32bit instead of 64bit (which changed because downloaded 64bit version of sqlite lib.
private string fullpath = path.combine(appdomain.currentdomain.basedirectory, "testdb.db");
the problem on launch, there error saying access "c:/program files (x86)/microsoft visual studio 11.0/ide/test.db" denied
, means somehow appdomain.currentdomain.basedirectory
references directory instead of application's root directory.
what cause of this?
update: apparently, changing applications platform target x64, , using 64b version of sqlite fixes problem...
i think it's because started application in debug mode hosted in visual studio hitting f5!
Comments
Post a Comment