0

I am using Visual Studio 2019, my Web API project builds and runs fine locally. But, when trying to deploy on Azure App Service it fails with the following error

D:\home\site\repository\src\packages\Microsoft.Net.Compilers.Toolset.3.6.0\build\Microsoft.Net.Compilers.Toolset.props(2,1): error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. [D:\home\site\repository\src\Verify.WebApi\Verify.WebApi.csproj]

I checked my .csporj file it already has MSBuild 2003 format. I also installed the latest nuget packages Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Microsoft.Net.Compilers and Microsoft.Net.Compilers.Toolset.

Azure App Service is using MSBuild 14.0 to build my project.

Can someone help in resolving this issue?

tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83
  • https://stackoverflow.com/questions/42509313/the-default-xml-namespace-of-the-project-must-be-the-msbuild-xml-namespace – Sajeetharan Jul 16 '20 at 18:34
  • ```D:\home\site\repository\src\packages\Microsoft.Net.Compilers.Toolset.3.6.0\tasks\net472\Microsoft.Managed.Core.targets(60,27): error MSB4184: The expression """.GetPathsOfAllDirectoriesAbove()" cannot be evaluated. Method 'System.String.GetPathsOfAllDirectoriesAbove' not found. [D:\home\site\repository\src\Verify.WebApi\Verify.WebApi.csproj]``` now getting this one. Fixed the earlier one by updating MsBuild version to 15.0 – tRuEsAtM Jul 16 '20 at 19:05

0 Answers0