Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure 错误MSB4086:尝试对“进行数字比较”$(MSBuildVersion)“;其评估结果为&引用;而不是一个数字_Azure_Nuget_Continuous Deployment_Kudu_Compiler Services - Fatal编程技术网

Azure 错误MSB4086:尝试对“进行数字比较”$(MSBuildVersion)“;其评估结果为&引用;而不是一个数字

Azure 错误MSB4086:尝试对“进行数字比较”$(MSBuildVersion)“;其评估结果为&引用;而不是一个数字,azure,nuget,continuous-deployment,kudu,compiler-services,Azure,Nuget,Continuous Deployment,Kudu,Compiler Services,尝试使用Azure Kudu部署项目(从BitBucket repo读取)我在Azure门户内的部署中心中遇到以下错误 此错误发生在所有最新版本的NuGet软件包中。唯一有效的版本是5个月前的版本 有人知道这是什么原因吗?Azure Kudu是否尚未更新 Command: "D:\home\site\deployments\tools\deploy.cmd" Handling .NET Web Application deployment. MSBuild auto-detection: usi

尝试使用Azure Kudu部署项目(从BitBucket repo读取)我在Azure门户内的部署中心中遇到以下错误

此错误发生在所有最新版本的NuGet软件包中。唯一有效的版本是5个月前的版本

有人知道这是什么原因吗?Azure Kudu是否尚未更新

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling .NET Web Application deployment.
MSBuild auto-detection: using msbuild version '14.0.23107.0 built by: D14REL' from 'D:\Program Files (x86)\MSBuild\14.0\Bin'.
Restoring NuGet package Microsoft.Net.Compilers.3.1.1.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.net.compilers/3.1.1/microsoft.net.compilers.3.1.1.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.net.compilers/3.1.1/microsoft.net.compilers.3.1.1.nupkg 937ms
Installing Microsoft.Net.Compilers 3.1.1.
Adding package 'Microsoft.Net.Compilers.3.1.1' to folder 'D:\home\site\repository\packages'
Added package 'Microsoft.Net.Compilers.3.1.1' to folder 'D:\home\site\repository\packages'

NuGet Config files used:
    D:\local\UserProfile\AppData\Roaming\NuGet\NuGet.Config

Feeds used:
    D:\home\.nuget\
    https://api.nuget.org/v3/index.json

Installed:
    1 package(s) to packages.config projects
D:\home\site\repository\packages\Microsoft.Net.Compilers.3.1.1\tools\Microsoft.Managed.Core.targets(63,60): error MSB4086: A numeric comparison was attempted on "$(MSBuildVersion)" that evaluates to "" instead of a number, in condition "$(MSBuildVersion) >= 16.1.0". [D:\home\site\repository\MyCompany\MyCompany.csproj]
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\MyCompany\MyCompany.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d727f56aa60788";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\84.10807.4030\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
####编辑####


我还打开了@Kudu GitHub repo。

我在Kudu部署和typescript版本中遇到了类似的问题。基本的问题似乎是kudu正在逐渐退出,转而支持Azure DevOps,因此msbuild的一些依赖项已经过时。以下三个选项可能有助于您解决此问题:

  • 切换到Azure DevOps-您将可以访问各种构建代理,并对它们的功能进行更多的控制,但一般来说,它们只是更为最新
  • 修改您的构建脚本-这是kudu使用的脚本,您可以自定义它,然后将其置于源代码管理中,有关更多信息,请参阅。看起来您的目标是msbuild 14,但我非常确定15应该是可用的,您可以将构建脚本指向这一点和/或进行其他调整
  • 离线处理一些构建,即在提交之前-这是我使用typescript的临时解决方案,我能够传输到JavaScript并提交js,这意味着我可以禁用kudu的typescript处理
  • 在日志中引用的目标文件中查找,并通过该文件中的各种msbuild条件追溯问题的起始位置,也可能会有所帮助。您可以通过kudu中的命令提示符查看所有这些