I get NotSupportedExceptionwhen I use an outdated library from LINQPad. I found that this exception is caused by what Code Access Securityis .NET Frameworkmissing.
https://msdn.microsoft.com/en-us/library/ee191568(v=vs.110).aspx
Therefore, I add the file <NetFx40_LegacySecurityPolicy>in LINQPad.configaccordance with the MSDN article, but it still calls Exception. Adding a configuration item to LINQPad.UserQuery.exe.confighelps me, but it seems to be restored at startup LINQPad.
Is there any other way to add a configuration item for LINQPad?
(And why this element does not work in LINQPad.config...)
Example (calls the same Exception):
// Add reference for System.Security.dll and import namespace System.Security.
new HostSecurityManager().DomainPolicy
source
share