System.ArgumentException: Illegal characters in path

Hi,

I’ve got this error during my deployment :

System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.InternalCombine(String path1, String path2)
at System.IO.FileSystemEnumerableIterator1.GetFullSearchString(String fullPath, String searchPattern) at System.IO.FileSystemEnumerableIterator1…ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.Directory.EnumerateFiles(String path, String searchPattern, SearchOption searchOption) at System.Linq.Enumerable.<SelectManyIterator>d__142.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1…ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Calamari.Deployment.Conventions.SubstituteInFilesConvention.Install(RunningDeployment deployment) in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\Conventions\SubstituteInFilesConvention.cs:line 26
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 60
at Calamari.Deployment.ConventionProcessor.RunConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 28
Running rollback conventions…
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.InternalCombine(String path1, String path2)
at System.IO.FileSystemEnumerableIterator1.GetFullSearchString(String fullPath, String searchPattern) at System.IO.FileSystemEnumerableIterator1…ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.Directory.EnumerateFiles(String path, String searchPattern, SearchOption searchOption) at System.Linq.Enumerable.<SelectManyIterator>d__142.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1…ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Calamari.Deployment.Conventions.SubstituteInFilesConvention.Install(RunningDeployment deployment) in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\Conventions\SubstituteInFilesConvention.cs:line 26
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 60
at Calamari.Deployment.ConventionProcessor.RunConventions() in y:\work\b1fd300731d5f2fc\source\Calamari\Deployment\ConventionProcessor.cs:line 50
at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments) in y:\work\b1fd300731d5f2fc\source\Calamari\Commands\DeployPackageCommand.cs:line 107
at Calamari.Program.Main(String[] args) in y:\work\b1fd300731d5f2fc\source\Calamari\Program.cs:line 18
The remote script failed with exit code 100

Which kind of characters can throw this exception ?

Thanks

Hi,

Thanks for getting in touch. We’re gonna need a bit more info to know what is going on.

  • Are you able to pinpoint on which step this is happening?
  • Could you please provide us a deployment log? If possible, only run the step that is triggering the issue to avoid the noise on the log.

http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Thanks,

Dalmiro

Hi,

I found my mistake. In the processes, I’ve put a format chain (like Web.Release.config => Web.config) in the “Substitute variables in files” feature.

Sorry for the trouble :slight_smile:

Thanks.

Hi Pad,

Great to hear that you were able to sort out your issue!

Thank you and kind regards,
Henrik