madskristensen / LessCompiler

A Visual Studio extension
Other
15 stars 8 forks source link

Exception #7

Open davegardner opened 6 years ago

davegardner commented 6 years ago

Installed product versions

Description

Argument Exception: Illegal characters in path

Steps to recreate

  1. Install Bootstrap
  2. Open any less file
  3. Save it

Current behavior

See exception below. The path of the current less file where this exception was thrown is: C:\Users\dave\Source\Repos\Orchard\src\Orchard.Web\Themes\Cascade.Bootstrap\Styles\bootstrap\less\buttons.less

15/12/2017 6:32:10 AM: System.ArgumentException: Illegal characters in path. at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath) at System.IO.FileInfo.Init(String fileName, Boolean checkHost) at System.IO.FileInfo..ctor(String fileName) at LessCompiler.ProjectMap.d11.MoveNext() in C:\projects\lesscompiler\src\Compiler\ProjectMap.cs:line 96 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at LessCompiler.ProjectMap.d10.MoveNext() in C:\projects\lesscompiler\src\Compiler\ProjectMap.cs:line 86 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at LessCompiler.ProjectMap.d7.MoveNext() in C:\projects\lesscompiler\src\Compiler\ProjectMap.cs:line 43 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at LessCompiler.LessCatalog.d6.MoveNext() in C:\projects\lesscompiler\src\Compiler\LessCatalog.cs:line 38

Expected behavior

More info needed on why path is illegal. Error makes no sense in a project that otherwise compiles and runs.

OzBob commented 6 years ago

Replicated on Visual Studio Pro 2017 15.7.4 Less Complier v 0.9.38 Upon opening any LESS file in the web project produces the above exception

OzBob commented 6 years ago

When LESS file contains an import that has url("//file.less") Where the path in the url can not be used to create a FileInfo object an exception of type System.ArgumentException is thrown.