我正在尝试通过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
提前感谢您提供任何提示和提示!
答案 0 :(得分:0)
这是WebCompiler项目的当前未解决问题。 Azure文件系统以本地环境不受限制的方式被锁定。即使文件存在于服务器上的路径中,部署脚本也无法读取它。
在扫描关于问题的评论(https://github.com/madskristensen/WebCompiler/issues/146)时,除了预编译CSS并将其包含在您的存储库中之外,目前似乎没有解决方案。
答案 1 :(得分:0)
最后我按照以下方式处理:
接下来的两个步骤是可选的:
这样我仍然可以使用常量编译来开发并将其推送到我的存储库以在Azure上启动CI。