none
Cannot Open File RRS feed

  • Question

  • I've been spending all morning trying to figure out why my forms will no longer opening in the designer (now recieving pop-up window saing "<file path> Cannot open file.").  Here is what triggered the problem:

    I took a C# based custom control, converted it to C++/CLI, and moved it into a pre-existing C++/CLI library. All my forms were using this previously.  When I did this, I was able to open the forms, manipulate them, and run them.  After quitting for the night, and coming back, the forms will no longer open, but they still compile and run.

    I can manually delete all instances of the control, and the forms work again.  I can re-add them, and the forms are fully editable until I restart Visual Studio.

    I took this control, and placed it into a test app and test control library to see if I could reproduce the problem.  That test app works fine.  It seems that it is somehow related to the library that  moved it into which is a mix of regular C++ and C++/CLI.  I've not had a control in there until now.

    I'm at a bit of a loss, but I would really rather this control be C++/CLI since I need to have it access a number of regular C++ libraries. Any ideas where to look from here?
    Friday, June 9, 2006 5:17 PM

All replies

  • I don't know the solution but I can suggest an approach for tracking it down. Start with a completely new control in C++/CLI that does nothing. I expect you can add this and it works fine. Exit and restart VS2005 and everything is cool. Then add in a subset of the functionality from your C# control. Exist and restart and check it all works fine. Just repeat the process of adding extra functionality until it breaks and then you will know that set of code causing the issue. Painful but sometimes the brute force approach is the only one that seems possible.

    By the way, once you have the problem occuring have you tried starting up VS2005 as the debugging project so you can debug the design time code of your control?

    Phil Wright
    http://www.componentfactory.com
    Free user interface controls for Visual Studio 2005

    Friday, June 9, 2006 11:16 PM