Azure websites Deploy from Source Control fails on nuget dependency

ぐ巨炮叔叔 提交于 2019-12-05 23:00:17

问题


Asp.Net v4 Webforms App has a dependency on Windows.Azure.Storage. This all works fine if i use WebDeploy to deploy it to Azure Websites.

Now i want to use a branch in my bitbucket repo to have it auto deploy from source control.

I set up the branch, linked azure to it, and then triggered a deploy.

But it fails, and this is in the Azure log...

D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\DWASFiles\Sites\kdb\VirtualDirectory0\site\repository\Pfv.Kdb.UI\Kdb.UI.csproj]

Nuget has package restore enabled, and i checked nuget.targets to ensure that DownloadNugetExe condition is set to true.

Why is it failing to pull in the nuget dependencies?


回答1:


I have just tried out creating a MVC4 app in VS2012 referencing Windows.Azure.Storage nuget package and succesfuuly pushed it from local git to windows azure without any issues.

I did not hit this issue. I have enabled nuget package restore and also included a .gitignore in to my git repo not to push binary and package files.

I also saw this with pushing the repo to WAWS.

remote: Successfully installed 'WindowsAzure.Storage 2.0.5.1'.



来源:https://stackoverflow.com/questions/16709995/azure-websites-deploy-from-source-control-fails-on-nuget-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!