The issue we experienced was also with the ImageList
inside the *.resx file (opened in code, not the designer):
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
[bunch of binary data here]
</value>
</data>
We confirmed this was by only deleting the <data />
tag related to the ImageList
(see above) and then deleting the references in the control's designer:
//initialize
this.imageListSuperHeroes = new System.Windows.Forms.ImageList(this.components);
//control that references the ImageList
this.btnAwesome.ImageKey = "superman.gif";
this.btnAwesome.ImageList = this.imageListSuperHeroes;
Add the image references (use individual images!) of the control from the "Project resource file", rather than the "Local resource" and update the references you removed from your forms.
this.btnAwesome.Image = global::PMPPlus.Properties.Resources.Superman;
That fixed it for us and hopefully this helps move you in the right direction. If not, dig around the *.resx to see which bad <data />
is screwing you up.
Related link: http://connect.microsoft.com/VisualStudio/feedback/details/566131/error-in-resx-file-when-adding-imagelist
They suggested some workarounds that didn't fit our needs:
- Target another platform and framework
- Use corflags to screw with your C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin directory!
Our Setup
- Old Environment: Windows XP 32-bit
- New Environment: Windows 7 64-bit
- Common Setup: VS2010 + Target Framework: 3.5 + Target Platform: x86