Okay, this is more of a build error than a programming error. I have never had much reason to get my hands dirty with builds, so this error is baffling me.
I have tried
I just had the same problem and checking my .csproj file I found nothing wrong, no duplicate imports - nothing.
After stumbling 30 minutes I got it fixed by opening my .csproj file and rearranging tags in it.
Initially I moved them all to the top, but got an error message that OutputPath is not defined, then I moved all of them right below the where they were defined and everything worked. All of them except:
Most probably moving NuGet.targets from the bottom of the file was what actually fixed it. I have no idea, nor I want to waste more time.
Hope this helps someone.