-1

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.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Martin Braun
  • 10,906
  • 9
  • 64
  • 105
  • Have you tried running Visual Studio Installer to repair your Visual Studio installation? – Eriawan Kusumawardhono Nov 04 '21 at 05:19
  • @EriawanKusumawardhono I tried that without luck, but I found a solution, I just don't know why Visual Studio wants access to this folder in the first place, since logs are not created there, at least for me. – Martin Braun Nov 14 '21 at 17:23

2 Answers2

0

If your program runs correctly and Visual Studio displays the wavy line warning by mistake, you could try do the following settings to not display the warning wavy line.

Uncheck Display Error Curve :

Tools> Options> Text Editor> General >Display Error Curve

You can also reset the settings.

ToolsImport and Export Settings...Reset all settings.

Hui Liu-MSFT
  • 770
  • 4
  • 15
0

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.

Martin Braun
  • 10,906
  • 9
  • 64
  • 105