How do I edit LINQPad.UserQuery.exe.config?
Options
I want to edit LINQPad.UserQuery.exe.config because
Actually, I can edit both
What is the correct way to edit LINQPad.UserQuery.exe.config?
configuration/runtime/NetFx40_LegacySecurityPolicy
element is not worked in LINQPad.config.Actually, I can edit both
C:\Program Files (x86)\LINQPad4\LINQPad.exe.config
and AppData\Local\LINQPad\ProcessServer5X86\LINQPad.UserQuery.exe.Config
but later one is overwritten at LINQPad launching.What is the correct way to edit LINQPad.UserQuery.exe.config?
Comments
-
Create a file called LINQPad.config in the directory where LINQPad.exe exists.
LINQPad will then pick that up and use it for your queries. -
NetFx40_LegacySecurityPolicy configuration doesn't seem to work in LINQPad.config unlike other configurations. The configuration is used for avoiding CAS Policy compatibility issue.
https://msdn.microsoft.com/en-us/library/ee191568(v=vs.110).aspx
For example, below code causes NotSupportedException in .NET 4 without setting it.// Add reference for System.Security.dll and import namespace System.Security. new HostSecurityManager().DomainPolicy
And my results are:
- in LINQPad.config: NG
- in LINQPad.UserQuery.exe.config: OK
- in LINQPad.exe.config: OK (with disabling "Run each query in its own process")
-
Understood.
I'll fix this in the next beta, so that LINQPad.exe.config works whether or not you enable "Run each query in its own process".