2013-10-22 53 views
0

我試圖創建一個自定義部署Azure的腳本,這個指南中出現的異常...... http://blog.amitapple.com/post/51576689501/testsduringazurewebsitesdeploymentAzure的自定義deploy.cmd越來越.nuget nuget.targets錯誤:Web客戶端請求

但我繼續得到這個例外,

C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\Zenworx\.nuget\nuget.targets(83,8): error : An exception occurred during a WebClient request. 

nuget.targets中的第(83,8)行是;

<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" /> 

這裏是我的Azure的部署日誌...

Command: deploy.cmd 
Handling .NET Web Application deployment. 
    Restoring NuGet packages... 
    To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. 
    All packages listed in packages.config are already installed. 
    zenworx -> C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\zenworx\zenworx\bin\zenworx.dll 
    Transformed Web.config using C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\zenworx\zenworx\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config. 
    Copying all files to temporary location below for package/publish: 
    C:\DWASFiles\Sites\tst-zenworx\Temp\a3de0b4d-a3a6-4370-b2dd-f76082c14730. 
Building test project 
C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\zenworx\.nuget\nuget.targets(83,8): error : An exception occurred during a WebClient request. 
An error has occurred during web site deployment. 
Handling .NET Web Application deployment. 
    Restoring NuGet packages... 
    To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. 
    All packages listed in packages.config are already installed. 
    zenworx -> C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\zenworx\zenworx\bin\zenworx.dll 
    Transformed Web.config using C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\zenworx\zenworx\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config. 
    Copying all files to temporary location below for package/publish: 
    C:\DWASFiles\Sites\tst-zenworx\Temp\a3de0b4d-a3a6-4370-b2dd-f76082c14730. 
Building test project 
C:\DWASFiles\Sites\tst-zenworx\VirtualDirectory0\site\repository\zenworx\.nuget\nuget.targets(83,8): error : An exception occurred during a WebClient request. 
An error has occurred during web site deployment. 
D:\kuduservice\wwwroot\bin\scripts\starter.cmd deploy.cmd 

回答

1

這聽起來像你NuGetToolsPath不正確。因爲它試圖下載Nuget.exe,這意味着它無法找到它。

看看更新此行的nuget.targets文件,以反映在您的.nuget文件夾是有關解決方案根:

$(SolutionDir).nuget

+0

你是對的,在$(解決方案)我的nuget.targets文件中的參數沒有指向正確的位置。我修復了我的項目文件夾結構,它不再嘗試下載nuget.exe文件,因爲它在該文件夾中。謝謝! – devfunkd