How to Fix "Error NETSDK1005 Assets File project.assets.json Doesn't Have a Target for netstandard2.0"
After updating Visual Studio from 16.7.x to 16.8.2 on our Azure DevOps build server, I got this error message:
##[error]C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5):
Error NETSDK1005:
Assets file ‘c:\agent\_work\***\obj\project.assets.json’
doesn’t have a target for ‘netstandard2.0’. Ensure that
restore has run and that you have included ‘netstandard2.0’
in the TargetFrameworks for your project.
