OK. I'm making a DLL with a bunch of Win forms controls. The project is in C++/CLI, compiled with the "/pure" switch.
I made a control that contained a TextBox, and two Panels. Each panel has a background image, which I set up using the BackgroundImage property in the "Properties" window. I built the project, the custom control shows up in my toolbox, life is good.
Now, I went to make a second control that uses multiple instances of the first. I added a new "User Control" item to the project and went into design view. I went to the toolbox, and tried dragging an instance of Control1 onto Control2. What an ugly error message:
Failed to create component 'Control1'.... Could not find any resources appropriate for the specified culture or the neutral culture. Make sure 'MyNamespace.MySubnamespace.Control1.resources' was correctly embedded or linked into assembly 'MyAssembly' at compile time, or that all satellite assemblies required are loadable and fully signed.
What the crap!!!???? I did a little research, and found an article that suggested the compiler was not creating the correct resource file. In fact, the only resource file I could find in the intermediate directory was "MySubnamespace.resources". Fine. So Visual Studio is too stupid to name its own resources correctly. So I selected the "Control1.resx" file, right-clicked and selected "Properties". I changed the intermediate file name to be "MyNamespace.Mysubnamespace.Control1.resources ", as the error message seemed to suggest was required.
Guess what? I still get the same error message!!!! Can someone explain or point me to a GOOD article on what I'm doing wrong and how to resolve it?
By the way, I don't get that error message once I take out the panel background images. It's obviously a problem with linking the resource file that contains the background image data.
Thank you.