Team Foundation Error: Type ‘Microsoft.TeamFoundation.ClientBasicAuthCredential’ is not marked as serializable

If you are getting this when trying to run a build in TFS or when trying to edit a build definition, you only need to reset your credentials. Go to Control Panel > User Accounts > Manage Windows Credentials > In tab Generic Credentials, find the one for your TFS server and edit the credentials. If that doesn’t work, try removing the credential.