When I try to migrate the configuration from one machine to a different machine from powershell fails with the exceptionPathTooLongException (stacktrace below). Is there a way around this problem?
For more background on what we’re trying to do (in case you can think of alternative solutions) we are trying to figure out a way to have a test server and a production server on different networks. So the configuration is done on the test server and then when we’re done we migrate those settings to our production service (our idea was to do it via SVN by checking in the json-files) and run a script that imports the settings. For obvious reasons, we want to maintain different deploy histories on both servers. Right now, though, we’re stranded by the fact that we can’t even import the settings from the json-files.
Full exception and stacktrace:
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader…ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at Octopus.Migrator.ImportProcess.ImportController.ImportScript(ImportContext context, String scriptFile) in Y:\work\refs\tags\3.3.8\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 471
at Octopus.Migrator.ImportProcess.ImportController.ImportScripts(ImportContext context) in Y:\work\refs\tags\3.3.8\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 460
at Octopus.Migrator.ImportProcess.ImportController.ExecuteWithTimer(ImportContext ctx, String name, Action1 work) in Y:\work\refs\tags\3.3.8\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 140 at Octopus.Migrator.ImportProcess.ImportController.ImportDocuments(IImportedDocumentSource backup) in Y:\work\refs\tags\3.3.8\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 103 at Octopus.Migrator.ImportProcess.ImportController.Import(IImportedDocumentSource backup) in Y:\work\refs\tags\3.3.8\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 61 at Octopus.Migrator.Commands.ImportFilesCommand.Start() in Y:\work\refs\tags\3.3.8\source\Octopus.Migrator\Commands\ImportFilesCommand.cs:line 91 at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.3.8\source\Octopus.Shared\Startup\AbstractCommand.cs:line 58 at Octopus.Shared.Startup.ConsoleHost.Run(Action
1 start, Action shutdown) in Y:\work\refs\tags\3.3.8\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\work\refs\tags\3.3.8\source\Octopus.Shared\Startup\OctopusProgram.cs:line 87