views:

50

answers:

1

When I create a new form under a sub-folder in VS2008 in a C++/CLI Winforms project, the .h and .cpp are correctly created under the sub-folder. However, when the form is opened in the designer and the title is changed, I get an error message saying that the .resx (AWOL till this particular moment) is already part of the project. One can then locate the .resx in the root folder of the solution. How do I get around this? (...without having to file a bug with MS who aren't gonna take this too seriously since this is the VS2010 season)

One option would be to create the form in the project's root folder and then move all three files (.cpp, .h and .resx) to the desired sub-folder once all changes have been made. In this case, I find that "View Designer" is no longer available once a form has been moved to a sub-folder.

Save me. Please. I have done nothing to deserve this.

+2  A: 

This fits my doctor's usual advice: if it hurts, don't do it. The C++ IDE isn't smart enough to create the .resx in the correct folder. It is fixable though. When you get the error message box, switch to Explorer and move the just created .resx file from the project directory to the subdirectory yourself. Switch back and hit OK, everything appears to work correctly after that.

Hans Passant