I get this strange error from Visual Studio 2019 in the XAML editor, but the project compiles, runs and the assignment is actually working:
I get this error in all UserControls containing this expression. In my MainWindow the same logic causes no Problems. root
is just the root namespace which is identical to local
on the MainWindow
. The settings object in App.xaml.cs
looks like this:
public static readonly ISettings Settings;
ISettings
is a simple interface for the ConfigurationBuilder
of Config.Net.
using Config.Net;
using System;
namespace MyApp.Properties
{
public interface ISettings
{
[Option(Alias = "skin")]
string Skin { get; }
[Option(Alias = "cryptoID")]
string CryptoID { get; }
// ...
}
}
Cleaning, rebuilding, restarting, nothing helps to get rid of the message. I keep ignoring it, but I wish to get rid of it, please.