0

我正在尝试通过 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

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

4

2 回答 2

0

最后我通过以下方式处理它:

  1. 安装包LessMsbuildTasks
  2. 从 webcompile中删除文件(在我的情况下为 theme.less)(右键单击该文件:Web 编译器 - 删除文件)
  3. 添加 Dotless 作为该文件的构建操作(右键单击该文件:属性 - 构建操作)
  4. 提交更改并推送

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

  1. compilerconfig.json 放在 .gitignore
  2. 再次将该文件添加到 Web 编译器(右键单击该文件:Web 编译器 - 编译文件)

这样我仍然可以使用持续编译来开发并将其推送到我的存储库以在 Azure 上启动 CI。

于 2016-09-07T17:26:09.103 回答
0

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

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

于 2016-08-31T20:29:46.027 回答