I get this error after I created a class from my xsd file using the xsd.exe tool. So I searched the net and found a solution. Here is the link: http://satov.blogspot.com/200
Had the same problem, but Xsd2Code didn't integrate with VS2012. So instead I went to my xsd.exe generated .cs file and did:
Find [][] Replace []
which worked.