Azure git deployment - missing references in 2nd assembly

后端 未结 3 1886
梦如初夏
梦如初夏 2021-02-15 02:44

I\'m trying to setup Bitbucket deployment to an Azure website. I successfully have Bitbucket and Azure linked, but when I push to Bitbucket, I get the following error on the Azu

相关标签:
3条回答
  • 2021-02-15 03:12

    So my .Common assembly had a reference to System.Web.Mvc and WebMatrix.WebData, and it looks like Azure doesn't support that. I had some membership code which used those references in the common assembly rather the web project. Removing those, removes the error. I'll have to refactor the code slightly so that the common library doesn't require these references.

    0 讨论(0)
  • 2021-02-15 03:13

    Updated 11/25/2012: After looking at Dan's repo, the problem is that the library project is using Mvc 4 from the GAC instead of using the NuGet package. Switching to the NuGet package makes it work fine on Azure.

    In theory, MVC4 could be in the GAC on the Azure machines and this would not be an issue. And maybe they'll get there at some point. Though generally, the MVC team is increasingly pushing a NuGet based model where you don't rely on things being in the GAC.

    Original answer:

    Generally, you should avoid committing binaries to your git repo, instead relying on NuGet to retrieve them. Please see https://github.com/KuduApps/Mvc4ApplicationFx40WithLib for a sample project that does this and works fine in Azure Web Sites.

    But based on your project structure, I see that your projects seem to use C++ (.vcproj). If so, then the likely problem is that C++ may not be supported today in Azure Web Sites when publishing via git. So far, I don't think this has come up as must people use C# & VB. If that is indeed the issue, then I suggest you open an issue on https://github.com/projectkudu/kudu so we can properly track this.

    0 讨论(0)
  • 2021-02-15 03:16

    I had this problem today at the azure bootcamp.

    Enabling Nuget Package Restore on the solution and commiting those changes to the github repo enabled a successful deployment

    0 讨论(0)
提交回复
热议问题