2016-03-15 37 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。

    相關問題