2

尝试将 Virto Commerce Community 部署到 Azure,但在“设置源代码管理”步骤中一直失败。我在 Azure 门户中包含了以下部署错误日志:

状态失败

跑了 17 秒

原因 更新 nuget 版本

Command: deploy.cmd
Handling .NET Web Application deployment.
Building D:\home\site\repository\VirtoCommerce.Platform.sln
command="nuget.exe" restore "D:\home\site\repository\VirtoCommerce.Platform.sln"
MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin\amd64'.
All packages listed in packages.config are already installed.
command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\VirtoCommerce.Platform.sln" /nologo /verbosity:m /t:Build /p:Configuration=Release;Platform="Any CPU";SolutionDir="D:\home\site\repository\\";OutputPath="D:\local\Temp\8d4ed6f06d9db0d"
  VirtoCommerce.Platform.Core -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Core.dll
  VirtoCommerce.Platform.Core.Web -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Core.Web.dll
  VirtoCommerce.Platform.Data.Azure -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Data.Azure.dll
  VirtoCommerce.Platform.Data.Notifications -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Data.Notifications.dll
  VirtoCommerce.Platform.Data -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Data.dll
  VirtoCommerce.Platform.Data.Security -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Data.Security.dll
  VirtoCommerce.Platform.Data.Serialization -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Data.Serialization.dll
App_Start\BundleConfig.cs(167,17): error CS1043: { or ; expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(167,17): error CS1513: } expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(168,20): error CS1525: Invalid expression term 'throw' [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(168,20): error CS1002: ; expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(175,25): error CS1014: A get or set accessor expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(175,32): error CS1014: A get or set accessor expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(175,39): error CS1014: A get or set accessor expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(175,47): error CS1513: } expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(175,68): error CS1003: Syntax error, ',' expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(177,22): error CS1002: ; expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(177,38): error CS1003: Syntax error, ',' expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(177,41): error CS1002: ; expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(177,53): error CS1519: Invalid token ')' in class, struct, or interface member declaration [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,22): error CS1520: Method must have a return type [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,41): error CS1001: Identifier expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,43): error CS1031: Type expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,43): error CS1001: Identifier expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,43): error CS1026: ) expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,43): error CS1002: ; expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,47): error CS1520: Method must have a return type [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,78): error CS1002: ; expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(179,78): error CS1519: Invalid token ')' in class, struct, or interface member declaration [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(181,13): error CS1022: Type or namespace definition, or end-of-file expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(181,20): error CS1031: Type expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(182,1): error CS1551: Indexers must have at least one parameter [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(181,24): error CS1003: Syntax error, '[' expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(181,24): error CS1001: Identifier expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(181,25): error CS1003: Syntax error, ']' expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(181,25): error CS1514: { expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
App_Start\BundleConfig.cs(203,1): error CS1022: Type or namespace definition, or end-of-file expected [D:\home\site\repository\VirtoCommerce.Platform.Web\VirtoCommerce.Platform.Web.csproj]
  VirtoCommerce.Platform.Testing -> D:\local\Temp\8d4ed6f06d9db0d\VirtoCommerce.Platform.Testing.dll
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\VirtoCommerce.Platform.sln" /nologo /verbosity:m /t:Build /p:Configuration=Release;Platform="Any CPU";SolutionDir="D:\home\site\repository\\";OutputPath="D:\local\Temp\8d4ed6f06d9db0d"
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\65.60818.2973\bin\Scripts\starter.cmd deploy.cmd
4

1 回答 1

3

这是因为 Virto Commerce Platform 有 C# 7 代码,但 Azure 上 MSBuild 的默认版本是 14.0,不支持 C# 7。

我已经更改了deploy.cmd,现在它可以找到MSBuild 15.0,它实际上是安装在Azure 上的。

再次尝试从 master 分支部署。

于 2017-08-28T08:55:25.593 回答