问题
In Azure SCM Debug Console, when I run msbuild /version
I get:
msbuild /version
D:\home\site\wwwroot
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.
14.0.23107.0
When I run it on my work machine I get:
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
14.0.25420.1
Version 14.0.25420.1 of msbuild is installed in "Microsoft Build Tools 2015 Update 3". Is there a way to update the msbuild version on my azure instance?
Note: This is related to https://github.com/dotnet/corefx/issues/14050
回答1:
Using the latest Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers NuGet packages on your WebApp as well as your Class Libraries and Console Apps will use the latest build tasks & props\targets, which resolves the issue I was seeing and avoids the need to update MSBuild in the Azure App Services environment.
For more details, see https://github.com/projectkudu/kudu/issues/2336
来源:https://stackoverflow.com/questions/42458570/how-to-update-msbuild-on-azure