For anybody else running into this issue, it turned out in my case that ensuring I was using a newer version of Nuget (5.x) instead of the 4.9.6 default version that my pipeline had been using by introducing a Nuget tool installer step at the beginning of my pipeline solved the issue. It seems that there is an issue with the older nuget version.
How to fix the error that occurs when executing the GenerateTemporaryTargetAssembly task
Danila
25
Reputation points
When creating an sdk project with wpf elements, the error Could not copy the file ProjectName.csproj.nuget.dgspec.json occurs when building on the server. I see that the files csproj.nuget.g.props and nuget.g.targets are created and copied, but the file csproj.nuget.dgspec.json. msbuild is not being created. How can this problem be solved