visual-studioasp.net-coresassweb-compiler

Error when Compiling with Web Compiler 2022+: "The system cannot find the specified path"


I have been on this problem for quite some time.

I am using Web Compiler 2022+ 1.14.11

And Visual Studio 17.8.5

For some reason suddenly the Web Compiler won't compile my scss file anymore.

Im getting the error in the Task Runner Explorer:

A:\Projekte\Privat\...\src\...\...> 
c:\users\simon müller\appdata\local\microsoft\visualstudio\17.0_899cbc51\extensions\bubxkjzz.tnk\WebCompiler.exe 
"A:/Projekte/Privat/.../src/.../.../compilerconfig.json" "wwwroot/css/app/test.scss"

Das System kann den angegebenen Pfad nicht finden.
Process terminated with code 1.

The error message is in German. I translated it to English: The system cannot find the specified path.

I have seen similar problems on the internet, and also tried many solution that all did not help.

I have tried:

I found a solution on GitHub to execute the prepare.cmd batch script in C:\Users\%username%\AppData\Local\Temp\WebCompiler1.14.11 but this folder does no contain any file.

I have also made sure that my Windows user has permission for all the folders (compilerconfig.json, localtemp, test.scss).

I have created a new scss file (test.scss) to test if it is a problem with the syntax or something. It only contains one stlye:

#test{
    background: green;
}

Anyone have a solution?

Thank you for your help.

Simon


Solution

  • The following procedure fixed the issue :

    1 open WebCompiler.exe in a resource editor (dotPeek can be used aswell) : WebCompiler.exe can be located in %UserProfile%.nuget\packages\buildwebcompiler2022\1.x.x\tools\net4.8\

    2 save the following resources to files : WebCompiler.Node.node.7z WebCompiler.Node.node_modules.7z

    3 extract the content of these two 7z files in the WebCompiler temporary folder example : %LocalAppData%\Temp\WebCompiler1.14.10

    Solution found on GitHub by jbress

    Make sure the version of the WebCompiler you have matches the folder.

    If you have multiple versions, repeat the steps for each version to be extra safe.