Asp.net mvc Github->;Azure部署:找不到路径

Asp.net mvc Github->;Azure部署:找不到路径,asp.net-mvc,azure,github,azure-git-deployment,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 spe

我试图通过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

提前感谢您提供的提示和提示

这是WebCompiler项目当前的一个公开问题。Azure文件系统的锁定方式与您的本地环境不同。即使该文件存在于服务器上的路径中,部署脚本也无法读取它


在扫描对问题()的评论时,除了预编译CSS并将其包含在存储库中之外,目前似乎没有解决方案。

最后,我以以下方式处理了它:

  • 安装软件包LessMsbuildTasks
  • 从webcompile中删除文件(在我的例子中是theme.less)(右键单击该文件:Web编译器-删除文件)
  • 将无点添加为该文件的生成操作(右键单击该文件:属性-生成操作)
  • 提交更改并推送
  • 接下来的两个步骤是可选的:

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

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

    因为编译.less文件时,错误是丢失的文件,我猜您的本地计算机上有另一个.less或.css文件,但您的Git存储库中不存在。我将css和less文件放在Github的正确文件夹中:/src/BeYourMarket.Web/Themes/Default/Content/或者这不是正确的文件夹?我还检查了azure服务器。该文件存在于命名文件夹中。我不知道为什么它说找不到路。