Search code examples
wpfxamlvisual-studio-2019.net-5config-net

"Access to the path 'C:\Program Files (x86)\Microsoft\Visual Studio\2019\Community\Common7\IDE\Logs' denied" in XAML editor


I get this strange error from Visual Studio 2019 in the XAML editor, but the project compiles, runs and the assignment is actually working:

Access to the path 'C:\Program Files (x86)\Microsoft\Visual Studio\2019\Community\Common7\IDE\Logs' is denied.

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.


Solution

  • Well, the message basically explains what's wrong, so I went ahead and created the folder C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Logs and gave everyone full permission in the ACL security settings in the property window of the folder. Now Visual Studio stops complaining, although no files are created in the folder anyways.

    I don't know why this has to be, but the message is gone eventually.