简体   繁体   中英

set msbuild to version 15 in Azure App Service

Iam trying to deploy a dotNet app in Azure App Service, but it doesn't work because the default version of msbuild is at 14:

D:\home\site\wwwroot>msbuild /version
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.

14.0.23107.0

I've tried to modify the deploy.cmd with the msbuild 15 path but it doesn't work. How can i simply update the default msbuild version to be at 15 ? thanks

This has been discussed here: https://github.com/projectkudu/kudu/issues/2350

D:\\home>set msbuild

MSBUILD_15_DIR=D:\\Program Files (x86)\\MSBuild-15.3.409.57025\\MSBuild\\15.0\\Bin

MSBUILD_PATH=D:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe

To use it you will need to have a custom deployment script with at least these two modification:

  1. pass the msbuild15.3 directory to nuget (nuget4 has dependency on it): nuget.exe restore "{your .sln file path}" -MSBuildPath "%MSBUILD_15_DIR%"
  2. use msbuild15.3 to build and publish: "%MSBUILD_15_DIR%\\MSBuild.exe {your build arguments}"

Having mentioned that, Azure manages OS patching on two levels, the physical servers and the guest virtual machines (VMs) that run the App Service resources. Both are updated monthly, which aligns to the monthly Patch Tuesday schedule. These updates are applied automatically, in a way that guarantees the high-availability SLA of Azure services.

While critical OS information is locked down from access (see Operating system functionality on Azure App Service ), the Kudu console enables you to query your App Service instance regarding the OS version and runtime versions.

Kindly checkout the document OS and runtime patching in Azure App Service for more details on this topic.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM