Github - > Azure部署:无法找到路径

时间:2016-03-15 11:35:30

标签: asp.net-mvc azure github azure-git-deployment

我正在尝试通过Github将.NET-MVC应用程序部署到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

提前感谢您提供任何提示和提示!

2 个答案:

答案 0 :(得分:0)

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

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

答案 1 :(得分:0)

最后我按照以下方式处理:

  1. 安装包 LessMsbuildTasks
  2. 删除文件(在我的情况下为theme.less)来自webcompile (右键单击该文件:Web编译器 - 删除文件)
  3. 为该文件添加Dotless as build action (右键单击该文件:Properties - Build action)
  4. 提交更改并推送
  5. 接下来的两个步骤是可选的:

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