WebCompiler icon indicating copy to clipboard operation
WebCompiler copied to clipboard

ArgumentNullException when trying to overwrite existing files

Open Pretagonist opened this issue 3 years ago • 1 comments

Installed product versions

  • Visual Studio: 2022 (v17.0.2)
  • This extension: 1.14.2

Description

When i try to run the extension via Task Runner the process fails if the files to write already exists from a previous run. If I manually remove the files the extension works without a problem.

Output in the taskrunner console


C:\dev\git\[projectname]\src\app\[appname]> c:\users\[username]\appdata\local\microsoft\visualstudio\17.0_ce87f30b\extensions\m5tn5y43.4ri\WebCompiler.exe "C:/dev/git/[projectname]/src/app/[appname]/compilerconfig.json" "Sass/Core/core.main.scss"
	
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path1
   at System.IO.Path.Combine(String path1, String path2)
   at WebCompiler.SassDependencyResolver.UpdateFileDependencies(String path) in W:\Git\Light Speed Solutions\WebCompiler\src\WebCompiler\Dependencies\SassDependencyResolver.cs:line 71
   at WebCompiler.DependencyResolverBase.GetDependencies(String projectRootPath) in W:\Git\Light Speed Solutions\WebCompiler\src\WebCompiler\Dependencies\DependencyResolverBase.cs:line 57
   at WebCompiler.Config.HasDependenciesNewerThanOutput(FileInfo input, FileInfo output) in W:\Git\Light Speed Solutions\WebCompiler\src\WebCompiler\Config\Config.cs:line 102
   at WebCompiler.Config.CompilationRequired() in W:\Git\Light Speed Solutions\WebCompiler\src\WebCompiler\Config\Config.cs:line 95
   at WebCompiler.ConfigFileProcessor.Process(String configFile, IEnumerable1 configs, Boolean force) in W:\Git\Light Speed Solutions\WebCompiler\src\WebCompiler\Config\ConfigFileProcessor.cs:line 42
   at WebCompiler.Program.Main(String[] args) in W:\Git\Light Speed Solutions\WebCompiler\src\WebCompiler\Program.cs:line 25
Process terminated with code -532462766.

Config

{
    "outputFile": "Sass/Core/compiled/core.main.css",
    "inputFile": "Sass/Core/core.main.scss",
    "options": {
      "sourceMap": true,
      "sourceMapRoot": "/"
    }
  }

Pretagonist avatar Dec 14 '21 13:12 Pretagonist

Would you mind sharing a sample project so that I can be sure our configurations are identical for debugging?

failwyn avatar Jan 05 '22 18:01 failwyn