0

I am trying to deploy a .NET-MVC-application to Azure via Github, but deployment fails with the following error message. What could be the reason for that? It works locally.

WebCompiler: Begin compiling compilerconfig.json
D:\home\site\repository\src\BeYourMarket.Web\Themes\Default\Content\theme.less : WebCompiler error 0: The system cannot find the path specified. [D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj]
D:\home\site\repository\src\BeYourMarket.Web\Themes\Default\Content\theme.less : WebCompiler error 0:  [D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj]
  WebCompiler: Done compiling compilerconfig.json
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d34cc45ff19d01";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\repository\src\\"
An error has occurred during web site deployment

Thank you in advance for any tipps and hints!

juvchan
  • 6,113
  • 2
  • 22
  • 35
sebvst
  • 753
  • 1
  • 13
  • 20
  • Since the error is a missing file when compiling a .less file, I'm guessing you have another .less or .css file on your local machine that doesn't exist in your Git repository. – Rytmis Mar 15 '16 at 13:09
  • I am having the css and less file in the correct folder on Github: /src/BeYourMarket.Web/Themes/Default/Content/ Or is this not the correct folder? – sebvst Mar 15 '16 at 14:02
  • I also checked the azure-server. The file exists in the named folder. I dont know why it says that the path cannot be found. – sebvst Mar 15 '16 at 14:53

2 Answers2

0

This is a current open issue with WebCompiler project. The Azure file system is locked down in ways that your local environment are not. Even though the file exists at the path on the server, the deployment script cannot read it.

In scanning the comments on the Issue (https://github.com/madskristensen/WebCompiler/issues/146), there doesn't seem to be a solution at this time except to pre-compile your CSS and include it in your repository.

Andy Rowse
  • 91
  • 1
  • 4
0

In the end I dealt with it the following way:

  1. Install package LessMsbuildTasks
  2. Remove the file (in my case theme.less) from webcompile (right click on that file: Web Compiler - Remove file)
  3. Add Dotless as build action for that file (right click on that file: Properties - Build action)
  4. Commit changes and push

The next two steps are optional:

  1. Put compilerconfig.json on .gitignore
  2. Add that file to Web compiler again (right click on that file: Web Compiler - Compile file)

That way I can still use the constant compiling to develop and push it to my repository to initiate CI on Azure.

sebvst
  • 753
  • 1
  • 13
  • 20