0

I'm working with VisualStudio 2019, on a .NET FrameWork 4.7.2 project. The project contains an xml config file (with .config ending).

I'm getting an IntelliSense warning on this file, and I would like to either suppress this specific warning, or to suppress all warnings for this file.

enter image description here

Example for a config file:

<?xml version="1.0" encoding="utf-8"?>
<ConfigExample>
</ConfigExample>

enter image description here

ibezito
  • 5,782
  • 2
  • 22
  • 46
  • This may help: https://stackoverflow.com/questions/7982525/visual-studio-disabling-missing-xml-comment-warning – Presi Feb 09 '21 at 15:27
  • Thanks, in my case it wasn't relevant because I don't have a warning number, and because it's an IntelliSense warning – ibezito Feb 09 '21 at 15:41
  • 1
    Hi, any update about this issue? Please check if my answer helps you handle the issue. If it helps, please do not forget to [accept it](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). And if not, please feel free to let us know:) – Mr Qian Feb 17 '21 at 07:08

1 Answers1

0

You can try the following step:

1) first,open our config file on the code editor and then click menu XML-->Create Schema

enter image description here

Then, save the App11.xsd file into a folder.

2) click XML-->Schemas--> and click Use this schemas for your that file.

enter image description here

3) close your project and then reopen your project to enable that file.

Besides, if you have defined multiple elements, you can first write the elements on the config file, then Click Create Schema then creates a total XSD file.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • Thanks Perry! This is was just a dummy-example from my side to generate a warning on purpose tough, I would like to suppress it somehow (not resolve it) – ibezito Feb 17 '21 at 09:09
  • To suppress it, you can try my suggestions and if you want them back, you can click do not use it under the custom `xxx.xsd` file under `XML`-->`Schemas`. – Mr Qian Feb 19 '21 at 06:36
  • If my answer helps you understand and handle the issue, please do not forget to accept it. – Mr Qian Feb 24 '21 at 03:20