
4,381 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all. I am using VS2019 with Windows 10.
My Outlook Add-In project is getting the following error:
Properties.Settings.Default.SnippetList.Length error CS1061: 'PropertyStore' does not contain a definition for 'Settings' and no accessible extension method 'Settings' accepting a first argument of type 'PropertyStore' could be found (are you missing a using directive or an assembly reference?)
This is the code I am using:
if (Properties.Settings.Default.SnippetList.Length > 0) //Error here
using (MemoryStream ms = new
MemoryStream(Convert.FromBase64String(Properties.Settings.Default.SnippetList)))
{
BinaryFormatter bf = new BinaryFormatter();
return (List<clsSnippets>)bf.Deserialize(ms);
}
I understand the error, but I don't know why I am getting it here. The SnippetList item exists in Settings. After looking in Solution Explorer, I found that Settings repeats twice; once in the Properties folder and again in the main folder. Is this correct? Any advice is appreciated, thanks. Here is an image of the Solution Explorer: