Private setter throwing error only on release build

后端 未结 1 1453
一个人的身影
一个人的身影 2021-01-18 17:29

I have a map-tile setting I\'m updating through a menu-button. I\'ve got an odd situation where I was only hitting an error on release builds. Code is as follows:

相关标签:
1条回答
  • 2021-01-18 18:16

    This is a known bug that has been fixed: https://connect.microsoft.com/VisualStudio/feedback/details/773682/wpf-property-with-private-setter-is-updated-by-a-twoway-binding

    So you may get this behaviour if your app targets .NET Framework 4.0 but .NET Framework 4.5+ is installed on your development machine.

    You should remove the private keyword from the setter to fix the issue.

    0 讨论(0)
提交回复
热议问题