VS 2015 + vNext + Azure:发布有效,但 SCM 部署无效?

VS 2015 + vNext + Azure: Publish works, but SCM deploy doesn't?

背景

正在处理 ASP.NET vNext/5 网站,我想将其部署到 Azure。

该站点是静态的 HTML,但 IApplicationBuilder 中的一个中间件除外,该中间件将 .less 文件作为 text/css。

问题

当我通过从 Visual Studio 发布进行部署时,我的站点在 Azure 中如我所料显示。

当我通过 Bitbucks 提交并且 SCM 管理工具接收到它时,它似乎工作正常(日志中没有错误或警告),但在页面上,我看到:

日志(供参考)

部署脚本生成日志:

Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --aspNet5 "D:\home\site\repository\src\app\JanelSipala.Web2\project.json"').

部署日志本身:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET 5 Web Application deployment.
KRE-CLR-x86.1.0.0-beta1 already installed.
Adding D:\local\UserProfile\.kre\packages\KRE-CLR-x86.1.0.0-beta1\bin to process PATH
Restoring packages for D:\home\site\repository\src\app\JanelSipala.Web2\project.json
Resolving complete, 653ms elapsed
Restore complete, 669ms elapsed
Copying to output path D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9
Using Package dependency Microsoft.AspNet.Server.IIS 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.Server.IIS.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.Server.IIS.0.0-beta2
    File: Microsoft.AspNet.Server.IIS.nuspec
 Using Package dependency Microsoft.AspNet.StaticFiles 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.StaticFiles.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.StaticFiles.0.0-beta2
    File: Microsoft.AspNet.StaticFiles.nuspec
    File: lib\aspnet50\Microsoft.AspNet.StaticFiles.dll
 Using Package dependency Microsoft.AspNet.Loader.IIS.Interop 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.Loader.IIS.Interop.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.Loader.IIS.Interop.0.0-beta2
    File: Microsoft.AspNet.Loader.IIS.Interop.nuspec
 Using Package dependency Microsoft.AspNet.Loader.IIS 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.Loader.IIS.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.Loader.IIS.0.0-beta2
    File: Microsoft.AspNet.Loader.IIS.nuspec
    File: lib\aspnet50\Microsoft.AspNet.Loader.IIS.dll
 Using Package dependency Microsoft.AspNet.Http 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.Http.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.Http.0.0-beta2
    File: Microsoft.AspNet.Http.nuspec
    File: lib\aspnet50\Microsoft.AspNet.Http.dll
 Using Package dependency Microsoft.AspNet.Http.Extensions 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.Http.Extensions.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.Http.Extensions.0.0-beta2
    File: Microsoft.AspNet.Http.Extensions.nuspec
    File: lib\aspnet50\Microsoft.AspNet.Http.Extensions.dll
 Using Package dependency Microsoft.Framework.Logging 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.Framework.Logging.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.Framework.Logging.0.0-beta2
    File: Microsoft.Framework.Logging.nuspec
    File: lib\aspnet50\Microsoft.Framework.Logging.dll
 Using Package dependency Microsoft.AspNet.Hosting 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.Hosting.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.Hosting.0.0-beta2
    File: Microsoft.AspNet.Hosting.nuspec
    File: lib\aspnet50\Microsoft.AspNet.Hosting.dll
 Using Package dependency Microsoft.Framework.DependencyInjection 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.Framework.DependencyInjection.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.Framework.DependencyInjection.0.0-beta2
    File: Microsoft.Framework.DependencyInjection.nuspec
    File: lib\aspnet50\Microsoft.Framework.DependencyInjection.dll
 Using Package dependency Microsoft.Framework.Logging.Interfaces 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.Framework.Logging.Interfaces.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.Framework.Logging.Interfaces.0.0-beta2
    File: Microsoft.Framework.Logging.Interfaces.nuspec
    File: lib\aspnet50\Microsoft.Framework.Logging.Interfaces.dll
 Using Package dependency Microsoft.AspNet.FileSystems 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.FileSystems.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.FileSystems.0.0-beta2
    File: Microsoft.AspNet.FileSystems.nuspec
    File: lib\aspnet50\Microsoft.AspNet.FileSystems.dll
 Using Package dependency Microsoft.AspNet.PipelineCore 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.PipelineCore.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.PipelineCore.0.0-beta2
    File: Microsoft.AspNet.PipelineCore.nuspec
    File: lib\aspnet50\Microsoft.AspNet.PipelineCore.dll
 Using Package dependency Microsoft.Framework.OptionsModel 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.Framework.OptionsModel.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.Framework.OptionsModel.0.0-beta2
    File: Microsoft.Framework.OptionsModel.nuspec
    File: lib\aspnet50\Microsoft.Framework.OptionsModel.dll
 Using Package dependency Newtonsoft.Json 6.0.6
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Newtonsoft.Json.0.6
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Newtonsoft.Json.0.6
    File: Newtonsoft.Json.nuspec
    File: lib\net45\Newtonsoft.Json.dll
 Using Package dependency Microsoft.Framework.ConfigurationModel 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.Framework.ConfigurationModel.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.Framework.ConfigurationModel.0.0-beta2
    File: Microsoft.Framework.ConfigurationModel.nuspec
    File: lib\aspnet50\Microsoft.Framework.ConfigurationModel.dll
 Using Package dependency Microsoft.AspNet.FileSystems.Interfaces 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.FileSystems.Interfaces.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.FileSystems.Interfaces.0.0-beta2
    File: Microsoft.AspNet.FileSystems.Interfaces.nuspec
    File: lib\aspnet50\Microsoft.AspNet.FileSystems.Interfaces.dll
 Using Package dependency Microsoft.AspNet.FeatureModel 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.FeatureModel.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.FeatureModel.0.0-beta2
    File: Microsoft.AspNet.FeatureModel.nuspec
    File: lib\aspnet50\Microsoft.AspNet.FeatureModel.dll
 Using Package dependency Microsoft.AspNet.HttpFeature 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.HttpFeature.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.HttpFeature.0.0-beta2
    File: Microsoft.AspNet.HttpFeature.nuspec
    File: lib\aspnet50\Microsoft.AspNet.HttpFeature.dll
 Using Package dependency Microsoft.AspNet.WebUtilities 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.AspNet.WebUtilities.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.AspNet.WebUtilities.0.0-beta2
    File: Microsoft.AspNet.WebUtilities.nuspec
    File: lib\aspnet50\Microsoft.AspNet.WebUtilities.dll
 Using Package dependency Microsoft.Framework.Runtime.Interfaces 1.0.0-beta2
  Copying files for Asp.Net,Version=v5.0
    Source: D:\local\UserProfile\.kpm\packages\Microsoft.Framework.Runtime.Interfaces.0.0-beta2
    Target: D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\packages\Microsoft.Framework.Runtime.Interfaces.0.0-beta2
    File: Microsoft.Framework.Runtime.Interfaces.nuspec
    File: lib\aspnet50\Microsoft.Framework.Runtime.Interfaces.dll
 Using Project dependency JanelSipala.Web2 1.0.0 for Asp.Net,Version=v5.0
  Copying source code from Project dependency JanelSipala.Web2
    Source D:\home\site\repository\src\app\JanelSipala.Web2\project.json
    Target D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\approot\src\JanelSipala.Web2
 Packing runtime KRE-CLR-x86.1.0.0-beta1
Copying contents of Project dependency JanelSipala.Web2 to D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\wwwroot
  Source D:\home\site\repository\src\app\JanelSipala.Web2\wwwroot
  Target D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9\wwwroot
Time elapsed 00:00:12.6399350
KuduSync.NET from: 'D:\local\Temp69a71d-4e0c-4748-ba17-0ab37477e0d9' to: 'D:\home\site'
Copying file: 'approot\global.json'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\KRE-CLR-x86.1.0.0-beta1.nupkg'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\KRE-CLR-x86.1.0.0-beta1.nupkg.sha512'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\KRE-CLR-x86.nuspec'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\k.cmd'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\klr.cmd'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\klr.exe'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\klr.host.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\klr.net45.config'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\klr.net45.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\klr.net45.managed.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\kpm.cmd'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.CodeAnalysis.CSharp.Desktop.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.CodeAnalysis.CSharp.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.CodeAnalysis.Desktop.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.CodeAnalysis.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.Framework.ApplicationHost.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.Framework.Runtime.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.Framework.Runtime.Loader.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Microsoft.Framework.Runtime.Roslyn.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\Newtonsoft.Json.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\System.Collections.Immutable.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\System.Reflection.Metadata.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\lib\Microsoft.Framework.DesignTimeHost\Microsoft.Framework.DesignTimeHost.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll'
Copying file: 'approot\packages\KRE-CLR-x86.1.0.0-beta1\bin\lib\Microsoft.Framework.Project\Microsoft.Framework.Project.dll'
Copying file: 'approot\src\JanelSipala.Web2\project.json'
Copying file: 'wwwroot\web.config'
Copying file: 'wwwroot\assets\css\sb-admin-2.css'
Copying file: 'wwwroot\assets\css\site.css'
Copying file: 'wwwroot\assets\css\timeline.css'
Copying file: 'wwwroot\assets\js\flot-data.js'
Copying file: 'wwwroot\assets\js\morris-data.js'
Copying file: 'wwwroot\lib\angular\angular.js'
Copying file: 'wwwroot\lib\angular-mocks\angular-mocks.js'
Copying file: 'wwwroot\lib\angular-route\angular-route.js'
Copying file: 'wwwroot\lib\bootstrap\bootstrap.css'
Copying file: 'wwwroot\lib\bootstrap\bootstrap.js'
Copying file: 'wwwroot\lib\bootstrap\bootstrap.less'
Copying file: 'wwwroot\lib\bootstrap\glyphicons-halflings-regular.svg'
Copying file: 'wwwroot\lib\bootstrap-social\bootstrap-social.css'
Copying file: 'wwwroot\lib\datatables\jquery.dataTables.css'
Copying file: 'wwwroot\lib\datatables\jquery.dataTables.js'
Copying file: 'wwwroot\lib\datatables-plugins\.bower.json'
Copying file: 'wwwroot\lib\datatables-plugins\make.sh'
Copying file: 'wwwroot\lib\datatables-plugins\README.md'
Copying file: 'wwwroot\lib\datatables-plugins\api\average().js'
Copying file: 'wwwroot\lib\datatables-plugins\api\column().title().js'
Copying file: 'wwwroot\lib\datatables-plugins\api\columns().order().js'
Omitting next output lines...
Finished successfully.

看起来在这种情况下,解决方案是将所有内容移回 beta1。

在项目应用设置中:

并且在 project.json 文件中:

一旦我这样做了,来自 SCM 的 Azure 部署工作得很好。