I'm getting two compiler warnings which I want to get rid of it. Missing XML comment for publicly visible type or member 'Properties.Settings' and 'Properties.Settings.Default'.
The following code is auto-generated by the Settings Designer of Visual Studio 2013:
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
/// <summary>
/// My Setting 1
/// </summary>
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsDescriptionAttribute("My Setting 1")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public double MySetting1 {
get {
return ((double)(this["MySetting1"]));
}
set {
this["MySetting1"] = value;
}
}
}
I know how to set an XML comment for each setting, see https://stackoverflow.com/a/3766930/7556646.
But I don't know how to set the XML comment for the Settings
class and the static Default
property?
Editing the auto-generated Settings.Designer.cs
file is not option for me. The changes are lost every time it's regenerated.
Unfortunately you can't. The only way to overcome this is by setting the access modifier to internal
, which will remove warning:
This of course will block access to the properties / resources from another projects in your solution, which might be a problem.