PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 27, 2022

[FIXED] How do you suppress this warning in VS: "The type of schema applied to the document is not supported"

 April 27, 2022     suppress-warnings, visual-studio, warnings     No comments   

Issue

This morning I created an MSTest project in C#, and for one of the JSON resources, Visual Studio is showing this warning:

The type of schema applied to the document is not supported

However there's no option available in the tooltip that allows you to suppress it. So then I started looking for a specific code or something to look for in the project settings; however Microsoft's apparently full list of compiler warnings doesn't list this one, for whatever reason. Since this is a test project, I could probably just suppress all warnings across the board and be fine, but that's still not ideal.

Is there a way to suppress this one surgically, ideally in a way that applies throughout the project?


Solution

Apparently all you have to do is to close out the file. It seems to only show when the file is opened.

Perhaps a later version of Visual Studio can make this warning behave more consistently with a standard warning in VS. Really it behaves very much like a refactoring / code cleanup suggestion (which commonly has a grey, squiggly line), rather than an actual warning. It's like it's just been mislabeled in development or whatever. However the good thing is that as long as the file is closed, it doesn't pollute the build or the errors window with warning messages.



Answered By - Panzercrisis
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing