I have a solution, mostly made up of .NET Framework 4.5 projects.
Recently, we added a project (library) that targets both netstandard2.0 and net45.
This was achieved by making the following amendments to the .proj file of the new library.
This builds fine in VS2019, but when pushed to Azure DevOps (building using the VS2019 agent) it fails with the following error.
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 element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
Can anyone please advise?
Edit 1:
Here is my YAML...
PublishProfile: 'VSORelease'
steps:
- task: VSBuild@1
displayName: 'Build solution Retailer/Retailer.sln'
inputs:
solution: Retailer/Retailer.sln
vsVersion: 16.0
msbuildArgs: '/p:DeployOnBuild=true /p:PublishProfile="$(PublishProfile)"'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
It appears that (even though I am able to choose VS2019 as an option in my build pipeline)... Visual Studio 2019 isn't available on Azure DevOps?
[warning] Visual Studio version '16.0' not found. Falling back to version '14.0'.
Any idea how I can get this to work?