diff --git a/src/NzbDrone.Common/Disk/LongPathSupport.cs b/src/NzbDrone.Common/Disk/LongPathSupport.cs
new file mode 100644
index 000000000..ef4bd3f7c
--- /dev/null
+++ b/src/NzbDrone.Common/Disk/LongPathSupport.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace NzbDrone.Common.Disk
+{
+ public static class LongPathSupport
+ {
+ public static void Enable()
+ {
+ // Mono has an issue with enabling long path support via app.config.
+ // This works for both mono and .net on Windows.
+ AppContext.SetSwitch("Switch.System.IO.UseLegacyPathHandling", false);
+ AppContext.SetSwitch("Switch.System.IO.BlockLongPaths", false);
+ }
+ }
+}
diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj
index 0bcd07088..45e9da18c 100644
--- a/src/NzbDrone.Common/NzbDrone.Common.csproj
+++ b/src/NzbDrone.Common/NzbDrone.Common.csproj
@@ -92,6 +92,7 @@
+
diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs
index bda04da2d..dc6e50753 100644
--- a/src/NzbDrone.Host/Bootstrap.cs
+++ b/src/NzbDrone.Host/Bootstrap.cs
@@ -3,6 +3,7 @@ using System.Reflection;
using System.Threading;
using NLog;
using NzbDrone.Common.Composition;
+using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Exceptions;
using NzbDrone.Common.Instrumentation;
@@ -28,6 +29,8 @@ namespace NzbDrone.Host
throw new TerminateApplicationException("Missing system requirements");
}
+ LongPathSupport.Enable();
+
_container = MainAppContainerBuilder.BuildContainer(startupContext);
_container.Resolve().Register();
_container.Resolve().Write();
diff --git a/src/NzbDrone.Host/app.config b/src/NzbDrone.Host/app.config
index 2f4a22ce8..e5a829c44 100644
--- a/src/NzbDrone.Host/app.config
+++ b/src/NzbDrone.Host/app.config
@@ -10,7 +10,6 @@
-