C# WPF app won't compile when I try to use newly added app settings -


a wpf app i've written no longer compile when try use added app setting in code behind. can see setting in settings designer , in app config, , compile if comment out reference setting.

the new setting intended store date informs when show balloon tip if minimized. appears newly added setting breaks build, regardless of type is.

is there step adding new settings i'm not aware of?

here's looks like:

//designer, pretty same other declarations:  [global::system.configuration.userscopedsettingattribute()] [global::system.diagnostics.debuggernonusercodeattribute()] public global::system.datetime baloonlastseen {    {       return ((global::system.datetime)(this["baloonlastseen"]));    }    set {        this["baloonlastseen"] = value;    } }  <!-- app.config: -->  <usersettings>     <myns.myapp>         <setting name="windowstate" serializeas="string">             <value>-1</value>         </setting>         <setting name="baloonlastseen" serializeas="string">             <value />         </setting>     </myns.myapp> </usersettings>  //and finally, attempt use in code-behind:  system.datetime baloon = properties.settings.default.baloonlastseen; 

calls other properties through properties.settings.default work fine, it's added ones seems tripping over. i've tried cleaning , rebuilding, , restarting visual studio, doesn't seem help.

one other piece of information attempt call property breaks intellisense. after failed attempt build, vs no longer detect types or member names i'm typing until restart.

here's compiler says wrong:

error   31  'myns.myapp.properties.settings' not contain definition 'baloonlastseen' , no extension method 'baloonlastseen' accepting first argument of type 'myns.myapp.properties.settings' found (are missing using directive or assembly reference?) 

what have wrought!?

whilst i'm grasping @ straws, aspect looks out-of-kilter me myns.myapp tags in app.config believe should myns.myapp.properties.settings e.g.

<!-- app.config: -->  <usersettings>     <myns.myapp.properties.settings>         <setting name="windowstate" serializeas="string">             <value>-1</value>         </setting>         <setting name="baloonlastseen" serializeas="string">             <value />         </setting>     </myns.myapp.properties.settings> </usersettings> 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -