posted on July 08, 2018 15:55
My .Net Core Hello World application built and ran fine on my dev machine under VS2017, and also using MsBuild from the command prompt.
On my Build Server it repeatedly failed claiming it could not find the log4net package (OK it is slightly more than "Hello World").
I fixed it by changing the Account that the Build Agent runs under. It was the default System account and I changed to a user account. I can't really be certain, but I think that the issue is caused by the System account not being able to restore packages to C:\Users\[System account]\.nuget\packages.
So whilst I didn't fully track down the problem, I have a working solution.
I personaly prefer that the build runs under a known account within my control rather than the somewhat nebulous System account.