2016-03-15 69 views
0

我想部署一个.NET的MVC应用程序通过Github上到Azure,但部署失败,出现以下错误消息。这可能是什么原因?它在本地工作。Github上 - > Azure的部署:不能找到路径

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 

预先感谢您的任何提示和提示!

+0

由于错误是丢失的文件编译.LESS文件时,我猜你有你的本地计算机上的另一个.LESS或.css文件并不在你的Git仓库存在。 – Rytmis

+0

我有Github上正确的文件夹的CSS和更少的文件:/src/BeYourMarket.Web/Themes/Default/Content/ 或者,这是不正确的文件夹? – sebvst

+0

我也检查了天蓝色服务器。该文件存在于指定的文件夹中。我不知道为什么它说道路找不到。 – sebvst

回答

0

这是当前的未决问题,WebCompiler项目。 Azure文件系统以本地环境不适用的方式被锁定。即使文件存在于服务器上的路径中,部署脚本也无法读取它。

在扫描关于问题的评论(https://github.com/madskristensen/WebCompiler/issues/146)时,目前似乎没有解决方案,除了预编译CSS并将其包含在存储库中。

0

在我处理它通过以下方式结束:从webcompile

  1. 安装包LessMsbuildTasks
  2. 删除文件(在我的情况theme.less)(右键点击该文件:网页编译器 - 删除文件)
  3. 添加无点作为该文件的生成操作(右键单击该文件:属性 - 构建动作)
  4. 提交更改和推

接下来的两个步骤是可选的:

  • compilerconfig.json上的.gitignore
  • 添加文件到网络编译再次(右键单击该文件:网页编译器 - 编译文件)
  • 这样我仍然可以使用常量编译来开发并将其推送到我的存储库以在Azure上启动CI。