In Visual Studio 2010 SP1, I have an XML Schema (XSD) file open with the following lines:
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
xs:import
has a wavy blue line under it, and when you hover over it, you get the following tool tip:
Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
How do I grant this permission so it can download the schema? Thanks.
Update: I forgot to mention this in my original post, but I've already reviewed Craig Watson's workaround. It defeats the purpose of having Visual Studio "automatically download DTDs and schemas" (Tools > Options > Text Editor > XML > Miscellaneous). I'm hoping for a solution rather than a workaround. Thanks.
(I know it's an old question. Since there's no accepted answer, I've decided to add this one anyway.)
This issue is answered at this question's answer.
All you need to do is edit the file's properties in Windows Explorer and unblock the downloaded file. That's what's causing the permissions exception: it's a downloaded (and thus untrusted) file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With