我正在使用 Visual Studio 2019,我的 Web API 项目在本地构建和运行良好。但是,当尝试在 Azure App Service 上进行部署时,它会失败并出现以下错误
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]
我检查了我的 .csporj 文件,它已经具有 MSBuild 2003 格式。我还安装了最新的nuget 包Microsoft.CodeDom.Providers.DotNetCompilerPlatform
和.Microsoft.Net.Compilers
Microsoft.Net.Compilers.Toolset
Azure App Service 正在使用 MSBuild 14.0 构建我的项目。
有人可以帮助解决这个问题吗?