XML Schema import fails with Request for the permission of type System.Net.WebPermission XML Schema import fails with Request for the permission of type System.Net.WebPermission xml xml

XML Schema import fails with Request for the permission of type System.Net.WebPermission


(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.


This post covers the workaround: http://craigwatson1962.wordpress.com/2011/02/07/visual-studio-2010-xml-schema-errorsxsdimport/

Not a full solution, since you have to download the XSD, put it in your project, then reference your local copy.