settings.default.<property> always advantage default value instead value persistant storage (xml file)
i recently wrote dll c# (.net 2.0) contains category requires an ip address. co-worker cave altered category collect ip ".dll.config" (xml) record -- apparently automatically generated "application settings" record combined (settings1.settings). advantage grant end-user change ip castle xml/config record during will.
unfortunately, i check formula out tree try accumulate (or use) new code, any concentration job dll wholly gets default value, rather value file.
the constructor calls config record looks this:
open category form : system.windows.forms.form
{
open form()
{
// mandatory windows form designer.
initializecomponent();
ip = ipaddress.parse(settings1.default.ipaddress);
}
}
i found where user said:
the 'old' values (the ones interpretation during growth time) tough coded. franework isn't means opening open config record defaults instead. always occur settings dll.
does meant i can't store an outmost value dll config file? (my co-worker somehow finished work...)
since horizon appears amateurish opening open config file, i figure out since it's failing? even detect happens?
decker: helps bit. unfortunately, i am minute dll specification, i don't indeed have opening application's config file. you'll note above, co-worker combined "settings1.settings" file. i didn't know during time, nonetheless seems adding "1" keeps out settings space any concentration calls it.
i speculation i'm perplexing figure out since dll doesn't seem config record sitting unbroken same directory. tracing thru formula step-by-step reveals nothing.
as an aside, i change "output type" public "class library" "windows application" supplement following lines during commencement dll code:
[stathread]
open stationary vacant main(string[] args)
{
system.windows.forms.application.run(new form());
}
when i run this, generates opposite config record (a ".exe.config") i change have lift new information file. i'm bit confused. any ideas?
Comments
Post a Comment