How to Collaborate with People You Don’t Like (2018)
This is a throwaway account, but I'd like some advice on this very subject.I recently ended a working relationship with a company that had a problem with 'not liking' me.
I moved to another country to offer onsite services to this company, as I created the core (design and tech) of a product that unexpectedly performed very well and became the focus of their business.  Unfortunately this meant throwing out years of work by their core team, the owners work included.As I had only been working remotely and very part time till this point, I saw an understandable resentment toward me and addressed it head on with each of the team when I arrived onsite. I perhaps failed in this because I was met with nods, smiles, and a professional behaviour me most of the time but not friendship.
I was actively excluded from team lunches for example. And I heard less than favourable rumours about me in the local community, a community I never worked in.This is ok, to a point if a little hurtful. As it didn't impact my work, I thought just letting it go was a better approach.
Many people had a secure job based on my work...thats probably my resentment talking but worth saying.Anyway it came to a head when I asked for the money we agreed for my contribution. (I had held off charging till the company was on more solid ground) At this point I was quickly told that the owner created the thing I made for them. Not me. 
Then closed ranks and told me I was a bad friend, refusing to pay obviously.I think being left out in the cold all this time was a good sign that the company as a whole was planing something like this. Not explicitly but something.Did I do the right thing in leaving?   Am I the 'bad friend'?