Azure github 部署和自动包还原

Azure github deploy and Automatic Package Restore

我正在尝试通过 Kudu 项目和 Git hub 在 azure 上部署一个项目,但没有成功。 这是部署日志:

Command: "D:\home\site\deployments\tools\deploy.cmd" Handling .NET Web Application deployment. MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild.0\bin'. All packages listed in packages.config are already installed. D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Common.Logging, Version=2.1.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Common.Logging.Core, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Ctl.Data, Version=1.0.5570.18090, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Ctl.Data.Excel, Version=1.0.5568.30276, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EPPlus, Version=4.0.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Pechkin, Version=0.5.8.1, Culture=neutral, processorArchitecture=x86". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Pechkin.Synchronized, Version=0.5.8.1, Culture=neutral, processorArchitecture=x86". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http.Formatting, Version=5.2.3.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. [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(3,7): error CS0246: The type or namespace name 'OfficeOpenXml' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(4,7): error CS0246: The type or namespace name 'OfficeOpenXml' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(5,7): error CS0246: The type or namespace name 'OfficeOpenXml' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\PdfExporter.cs(2,7): error CS0246: The type or namespace name 'Pechkin' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\PdfExporter.cs(3,7): error CS0246: The type or namespace name 'Pechkin' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(134,17): error CS0246: The type or namespace name 'ExcelPackage' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(139,17): error CS0246: The type or namespace name 'ExcelPackage' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(170,35): error CS0246: The type or namespace name 'ExcelWorksheet' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(181,34): error CS0246: The type or namespace name 'ExcelWorksheet' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(208,33): error CS0246: The type or namespace name 'ExcelWorksheet' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(227,29): error CS0246: The type or namespace name 'ExcelWorksheet' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(284,35): error CS0246: The type or namespace name 'ExcelWorksheet' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(292,52): error CS0246: The type or namespace name 'ExcelStyle' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(313,17): error CS0246: The type or namespace name 'ExcelVerticalAlignment' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] Exporters\ExcelExporter.cs(327,17): error CS0246: The type or namespace name 'ExcelHorizontalAlignment' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Exporting\XPTO.Infrastructure.Exporting.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] Request\Base\BaseRequest.cs(5,7): error CS0246: The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] UrbanAirSharpGateway.cs(10,7): error CS0246: The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] UrbanAirSharpGateway.cs(11,7): error CS0246: The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] UrbanAirSharpGateway.cs(44,33): error CS0246: The type or namespace name 'ILog' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] Request\Base\BaseRequest.cs(20,35): error CS0246: The type or namespace name 'ILog' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\UrbanAirSharp\UrbanAirSharp.csproj] XPTO.Infrastructure.Configuration.DTO -> D:\home\site\repository\XPTO.Infrastructure.Configuration.DTO\bin\Release\XPTO.Infrastructure.Configuration.DTO.dll D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.AspNet.Identity.Owin, 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. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Owin, Version=3.0.1.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. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Owin.Security, Version=3.0.1.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. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Owin.Security.Cookies, Version=3.0.1.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. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Owin.Security.OAuth, Version=3.0.1.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. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(2,14): error CS0234: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(6,43): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(14,16): error CS0246: The type or namespace name 'DbSet<ConfigurationDocument>' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(15,16): error CS0246: The type or namespace name 'DbSet<ConfigurationSection>' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(16,16): error CS0246: The type or namespace name 'DbSet<ConfigurationAttribute>' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(18,49): error CS0246: The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] ConfigurationContext.cs(18,33): error CS0115: 'ConfigurationContext.OnModelCreating(DbModelBuilder)': no suitable method found to override [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] Migrations\Configuration.cs(3,18): error CS0234: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] Migrations\Configuration.cs(5,43): error CS0246: The type or namespace name 'DbMigrationsConfiguration<XPTO.Infrastructure.Configuration.Data.ConfigurationContext>' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] Migrations\Configuration.cs(12,33): error CS0115: 'Configuration.Seed(ConfigurationContext)': no suitable method found to override [D:\home\site\repository\XPTO.Infrastructure.Configuration.Data\XPTO.Infrastructure.Configuration.Data.csproj] PayoneerApi -> D:\home\site\repository\PayoneerApi\bin\Release\PayoneerApi.dll TipAir.EntityFramework -> D:\home\site\repository\TipAir.EntityFramework\bin\Release\TipAir.EntityFramework.dll ExtendedServerAPI -> D:\home\site\repository\ExtendedServerAPI\bin\Release\ExtendedServerAPI.dll NexmoApi -> D:\home\site\repository\NexmoApiSM\bin\Release\NexmoApi.dll D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] D:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http.Formatting, Version=5.2.3.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. [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] AuthorizePayment\AuthorizePaymentRequest.cs(1,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] AuthorizePayment\AuthorizePaymentResponseObject.cs(1,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] AuthorizePayment\AuthorizePaymentResponseObject.cs(2,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] Common\FullPaymentMethod.cs(1,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] Common\PaymentMethodDetails.cs(19,10): error CS0246: The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] PaymentDetails\PaymentDetailsResponseObject.cs(76,10): error CS0246: The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] PaymentDetails\PaymentDetailsResponseObject.cs(76,23): error CS0246: The type or namespace name 'PropertyName' could not be found (are you missing a using directive or an assembly reference?) [D:\home\site\repository\ZooZPaymentAPI\ZooZPaymentAPI.csproj] Failed exitCode=1, command="D:\Program Files (x86)\MSBuild.0\Bin\MSBuild.exe" "D:\home\site\repository\TipAir.AdminSite\TipAir.AdminSite.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Tempd3cba35e7ed9a5";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\repository\.\" An error has occurred during web site deployment. \r\nD:\Program Files (x86)\SiteExtensions\Kudu.50815.2378\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

我删除了一些错误,只是参考问题,例如示例中的问题。

谢谢大家:)

从报错信息来看,好像少了很多程序集。对于此类问题,我建议您通过以下步骤将 copy local 设置为 true:

  1. 在解决方案资源管理器中,单击“显示所有文件”按钮以显示“引用”节点。
  2. 打开项目的引用节点。 右键单击“引用”列表中的所有引用,然后单击“属性”。
  3. Select 将本地值复制到 True。

根据 Jambor 指导,我发现了问题。 我的某些 Nuget 引用指向无效文件夹。 我编辑了所有 .csproj 文件,现在部署工作正常。