Azure git 部署 - 已复制空 dll

Azure git deployment - Empty dll copied

我在同一个解决方案中有 2 个 Web 应用程序(1 个 WebApi、1 个 MVC)都引用了解决方案(数据层)中的另一个项目。这两个 Web 项目都是通过 bitbucket 的持续部署设置的,一切正常。 自一个小时左右(未对数据层项目进行任何更改)以来,MVC 项目未能通过 git 部署(WebApi 很好)并出现以下错误:

CSC : error CS0009: Metadata file 'D:\home\site\repository\MyProj.Data\bin\Test\MyProj.Data.dll' could not be opened -- Image is too small. [D:\home\site\repository\MyProj.Web\MyProj.Web.csproj]

然后我登录到 MVC 项目的 azure FTP,我可以看到 D:\home\site\repository\MyProj.Data\bin\Test\MyProj.Data.dll 大小为 0 字节。

查看了 WebApi 项目的 FTP 并且复制了相同的 dll。

有什么建议吗?

谢谢

不确定是什么原因造成的,但我建议执行以下操作以达到干净状态:

  • 转到Kudu Console
  • 进入D:\home\site\repository
  • 运行 git clean -dxf
  • 在 Azure 门户中单击“重新部署”