Skip to content

Instantly share code, notes, and snippets.

@Yecats
Created August 2, 2016 16:35
Show Gist options
  • Save Yecats/961869e3b9d0e4f3f2c8808502043e40 to your computer and use it in GitHub Desktop.
Save Yecats/961869e3b9d0e4f3f2c8808502043e40 to your computer and use it in GitHub Desktop.
Long Path Sample 2
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version=".NETFramework,Version=v4.5.2"/>
</startup>
<runtime>
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false" />
</runtime>
</configuration>
@zihotki
Copy link

zihotki commented Aug 2, 2016

correct runtime is
<supportedRuntime version=".NETFramework,Version=v4.6.2"/>

@Cagatay342
Copy link

can we do that for System.UriFormatException when uri length is bigger than 260

@michaelthyregod
Copy link

michaelthyregod commented Feb 22, 2017

The sample does not work as expected - I've got this to work:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
  </startup>
  <runtime>
    <AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
  </runtime>
</configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment