I have the following code:
list.ContentTypes.Add(contentType);
It works on my dev environment, but on test fails with the following error:
A duplicate field name "[GUID]" was found.
I've had several attempts at trying to find this field that it complains about via powershell (really simple script to get the web and then attempt to get the field by id) and it can't find it anywhere.
Can anybody please help me identify a possible cause for this duplicate field when I can't even find it?
Please note, I've tried this on different webs and the GUID is exactly the same, so it's a site column/field that exists and the site collection level I'm assuming (I've even ran the powershell script against the site's root web).
EDIT: I've also searched my solution for this guid - couldn't find it.