Could not find schema information for the element 'uri'

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
Hi. I have to use the function Uri.EscapeUriString to prepare a url, and I have to use

VB.NET:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <uri>
    <schemeSettings>
      <add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes" />
    </schemeSettings>
  </uri>
</configuration>

so that the url doesn't contain stray forward slashes and backslashes. I've placed the above code in app.config but there are messages saying

Could not find schema information for the element 'uri'
Could not find schema information for the element 'schemeSettings'
Could not find schema information for the element 'add'
Could not find schema information for the element 'name'
Could not find schema information for the element 'genericUriParserOptions'
(even though add name is two words).

How do I find and configure these items of schema information?

Thank you.
 
That config is fine here (also same shown in documentation). When you select the app.config file and look in Properties window, what is the content of Schemas property? Mine (default in VS 2015) is:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\xml\Schemas\1033\DotNetConfig.xsd" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\xml\Schemas\EntityFrameworkConfig_6_1_0.xsd" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\xml\Schemas\RazorCustomSchema.xsd"
 
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas\DotNetConfig20.xsd. However, it contains lines I don't need, I only need the lines as in the top chat box above.
 
Back
Top