I am running Visual Studio 2010. I just change the frame work of my project from 4.0 to 3.5. I removed the reference Microsoft.Framework that it asked me to remove then trie
I ran into a Visual Studio bug that caused me a similar problem. I used this workaround to solve it:
A fix that SEEMS to work is to manually alter one character in the image stream EVERY TIME the usercontrol or form is edited in the designer
<data name="icons_20.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
Change to
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
That is
00LjAuMC4w
back to0yLjAuMC4w
at the end of the line (00
back to0y
)
But I have to fix that every time I change something in that form.
You can try regenerating the file by right-clicking the .resx file and choosing 'Run Custom Tool' from the context menu.
Edit: before you do this, change the Access Modifier or add a new value to force a regeneration.
Another edit: See Downgrade an application from .net 4.0 to 3.5 for another possibility
Having this problem for a long time, i lost hope that microsoft fix this bug ever. Then i begin use manual written code for handle pictures contains in resources:
string resource = "Company.Namespace.Resources.picture.gif";
pictureBox1.Image = new Bitmap(Assembly.GetExecutingAssembly()
.GetManifestResourceStream(resource));
Dot forget to set property "Build action" of picture.gif to "Embeded resource"
Not sure about this, but since the other answers didn't help, try this. The Version=4.0.0.0
in your file is telling the compiler to use .net 4.0 assemblies. Try changing them to Version=3.5.0.0
or Version=2.0.0.0
and see if that solves it.