My guess is that the designer is smart and remembers the settings for the component as you have it in the designer and thus sees it as the default.
This doesn't sound usual. Right clicking on the solution and hitting "Clean Solution" might help (it will delete all dlls and executables from each project's bin directory, which forces fresh builds to occur)
You might also want to check your build order sequence.
This is most likely due to references.
Your other projects probably copy in a reference to your component project. You'll have to rebuild these other projects for them to re-copy in the referenced component project, if it has changed. It is only updated at build time.
You can somewhat get around this by having them part of the same solution. In that case, you can set up your project dependencies correctly and it should handle things for you mostly automatically. But having everything in the same solution isn't always the right thing to do.
If you already have them part of the same solution or it's not a references problem, it might be due to component serialization. We've run into this quirk a lot when doing custom control development.
I work on a project that has a similar problem, I have found that if you touch the .NET config file or assembly information file (depending on your project type). The other projects will then reflect the component change...
I'm not sure why this happens, but this is how I overcome it...
Recently I have switch to building everything via Nant, and that takes care of the problem altogether.
Sometimes the Visual Designer serialize all your properties in the code-behind, even if they have the default value.
If your component have a default backcolor of Red, and you change the default backcolor to Blue, the components that use your component will change it back to Red.
I have try few of your suggestions.
- If I clean all the solution and build only the project that has the Custom control then I build the solution. Nothing change (To test it, I have change the color of the component to Yellow. Nothing change : fail.
- If I remove the reference and add it back to the project and then rebuild the solution. I can see the old color in the designer : fail.
I have updated the question with more information and an image for those who want to try to help me. Thx
This problem is still here. Just to let people know that I am still curious to find a way.