问题
I am building a new Windows 10 UWP (Universal Windows Platform) app using Visual Studio 2015. Actually I am porting my Windows 8.1 app, but I did so by creating a whole new project and manually pulling in each class.
My app is failing to build with the following error:
The type or namespace name 'SettingsPane' could not be found (are you missing a using directive or an assembly reference?)
The C# file in question does have a using statement for Windows.UI.ApplicationSettings, and I also get the error even if I try to fully qualify SettingsPane as Windows.UI.ApplicationSettings.SettingsPane.
According to this, SettingsPane should be available to Win10 apps, in the namespace I mentioned.
So the question is: why is my app failing to build? Am I missing a dll, or just not understanding something else?
回答1:
The remark at the top of the document clears it up:
[SettingsPane may be altered or unavailable for releases after Windows 10. Instead of using a SettingsPane, integrate settings options into the app experience. For more info, see Guidelines for app settings.]
Instead of using SettingsPane, make sure that you build native support for settings within the app itself.
来源:https://stackoverflow.com/questions/31888429/settingspane-not-found-in-windows-10-build