Sunday, October 5, 2008

Could not Find Schema Information for the Element

Like Frederik Gheysels, and nearly any other developer worth his coding pad (er, editor), I like to resolve all exception reports, even warnings. Of course, there are very rare occasions when I leave a compiler warning. When I do, you can expect a comment, adjacent to the offending line, noting the warning number, and stating that the code works as designed, regardless of the warning.

In the course of sorting out one such message, "Could not Find Schema Information for the Element", which was reported when I built a new C# application, my first to incorporate application settings, I ran across two related blog articles that helped solve the problem.

The first,"Silly Config file Warnings," by Peter Richie, summarizes the cause of the problem, and provides a usable workaround, in the form of an amended DotNetConfig.xsd.

The second, ".NET 2.0: Could not find schema information for ... part 2," in Frederik Gheysels' DevLog Weblog on C# and Software Development, while it clarified and validated the first one, omitted one critical detail, which is that, after you install the new schema definition, you must restart Visual Studio for it to take effect.

Thanks to Peter and Frederik for their writings that supplied almost everything needed to solve this annoying problem.

This is hardly the first post that I've seen that was missing an essential detail. Expect to see more such gaps filled in this space.

What Is a Thought Snippet?

A thought snippet is the very essence of a Blog. It is to thoughts as a Code Snippet is to a complete C#, VB.NET, or ASP.NET program.

The intent of this collection of thought snippets is to provide permanent storage for such things as useful insights, notes about gaps in documentation that I've discovered and filled in the course of creating new software. We stand on the shoulders of others. Through this collection of notes, others will benefit from these discoveries.