Windows Develop Bookmark and Share   
 index > Windows Forms Designer > VSNET 2005 FINAL release can't open a form
 

VSNET 2005 FINAL release can't open a form

Hello,

The new version of VSNET2005 FINAL release can't opens a form file that use Infragistics controsl. The error shown is the following:

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

The designer loader did not provide a root component but has not indicated why.

Hide    

at System.ComponentModel.Design.DesignSurface.get_View()
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.CreateWindowPane(DesignSurface surface)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.DeferrableWindowPaneProviderService.CreateWindowPane(DesignSurface surface)
at Microsoft.VisualStudio.Design.VSDesignSurface.Microsoft.VisualStudio.Designer.Interfaces.IVSMDDesigner.get_View()

It is a bug?. Errors/Warnings with exceptions (NULL) and NOT-CLSCompliant are shown too!.

I think that a SP1 is coming soon. What rare!.
Tabas  Wednesday, November 02, 2005 8:22 PM
All I can say for sure is that I moved my app to 2005 as soon as I downloaded it.  I had not tried with any of the betas.  My app uses a lot of user controls, and some of them do not display properly in the designer, although all work great at runtime.  The reason is that they rely on things that the designer does not pass in to them.  I didn't actually write that code, and I've never had time to play with it.

As a result, the IDE crashed when trying to display my main form about 10 times yesterday.  I have to say that it recovered well every time, and is fine now, but still, it's a bit touchy.  I see it's an 'Infragistics' control, you should contact them, and expect them to provide a fix.
cgraus  Wednesday, November 02, 2005 8:35 PM
Thank You for your reply, but... now all Infragistics controls were removed from the code (because the form can't be open for the IDE designer) and the problem persists. Some times the message error placed in the post # 1 in this thread is not displayed, but a dialog window is shown with this message:

Exception of type 'System.ComponentModel.Design.ExceptionCollection' was thrown.


The firts time that my application was opened no-errors, no-warnings at compilation time were shown. Only the project was modified via code editor, and re-builded, the warning, exceptions and other issues were thrown. Rare, but the application runs fine, only unhandle excepotions are shown (nullreferences, obsoletes objects, etc).

I think that this behavior is inherit from VSNET 2005 and that main that the release have bugs.

Anyway... waiting for the SP1.Sad
Tabas  Wednesday, November 02, 2005 8:42 PM
It's always easiest to assume the bug isn't in our code, but I can assure you, I've moved a big project to VS2005 and it works fine.  So, if it's a bug or not, there must be something in your code which is causing the problem.  You'd do better to try and work out what that is, instead of just blaming Microsoft and not being able to do anything.
cgraus  Wednesday, November 02, 2005 8:48 PM
I wan't debate or blaming to Microsoft. The project opens fine without error in VSNET2003, in 2005 the form can't be opened, the code has been reviewed many times, and nothing rare is detected. Anyway, you can be sure that i can't be quiet, because my projects have a projected time. All day lost with this issue (and form, of courseBig Smile!).

Regards
Tabas  Wednesday, November 02, 2005 8:53 PM
Yes, VS2005 is more touchy, and I had a similar problem, as I said.  But, the problem was in my code.  The problem is in your code, also.  I would suggest creating a copy of hte project, and removing things from it until it works, then you'll have an idea where the issue is.
cgraus  Wednesday, November 02, 2005 8:58 PM

Time for me to eat humble pie... you wouldn't believe it, but within hours of talking to you, my app again refused to load the main form, and crashed whenever I tried to load it.  I had tried clean/rebuild all, but it didn't help.  I found if you go to the obj directory of your project, delete everything in it, then clean and rebuild all, it fixes the problem.  Certainly it was really bad for me yesterday, and has not crashed since I did that.

I even posted a bug report to Microsoft before realising what the problem was...

cgraus  Thursday, November 03, 2005 10:35 PM
Do you understand me now? Big Smile

Like I said in my first post in this thread, the firt time the project open fine, compile fine, run fine. When you modify the project or do something, if you have luck, no errors or warnings. But unexpectly, two or more days after, the error are shown and the VSNET IDE can't load the forms.

Any way..., i have sent a BUG report to Microsoft too many hours ago today.

Regards
Now... we are waiting for the SP 1! Tongue Tied


PS.

I having another problem working with user controls. I have an user control... but i cant add it into another user control!!!. The error "The object hasn't a reference or instance" is shown.

If you create a new user control...where is invoked the Initializecomponent()?. No New sub or constructor is created.


Tabas  Thursday, November 03, 2005 11:20 PM
Like I said, if you remove the old obj files manually, then do a rebuild all, it helps.  But yes, there is a bug.
cgraus  Thursday, November 03, 2005 11:22 PM
 cgraus wrote:
Like I said, if you remove the old obj files manually, then do a rebuild all, it helps.  But yes, there is a bug.


Yes... Thank you for the info.... I saw this info in  http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=91206&SiteID=1.

Regards
Tabas  Thursday, November 03, 2005 11:27 PM

These workarounds are not working for me. No matter what I've tried, I still get "The designer loader did not provide a root component but has not indicated why" or "Exception of type 'System.ComponentModel.Design.ExceptionCollection."

Or both.

First of all, is this an acknowledged bug? I have a form design that compiles and executes, so if there's a problem with my code, I need VS2005 to point me in the direction of what *it* thinks the problem is. These error messages provide no help in solving any problem.

Second, is there an existing workaround? Cleaning, rebuilding, reloading, deleting \bin and \obj, ... none of these have helped me to restore the existing form design. How can I continue working on my existing form if I can't even view my existing form?

Any more information out there?

JonneeZ  Wednesday, June 28, 2006 7:44 PM

I had a similar problem and I am using Infragistics controls. I found that I had used the refactor tool to create a constant. There was some code in the InitializeComponent section that was modified to reference the new constant and not the original hard coded string value. Setting the string values back corrected my problem.

Tony Ball

Computer Services, Inc.

Tony Ball  Tuesday, July 11, 2006 5:59 PM
I have the same problem with various forms in my current solution. The difference is that these forms were created in VS2005, and worked until this morning. I have deleted the obj files, clean/rebuilt the solution, closed and restarted VS, even restarted my machine, but no joy what so ever. Has anyone found a solution. I know it is not my code, because they worked this morning, and the only thing that has happened with these forms, was when I loaded one of them to get a name of a control on it. No code changes have been made.
Andrew_Shough  Wednesday, May 02, 2007 12:30 PM

Arghh. I've had this issue before, but now none of my tricks (which have all been mentioned in this thread) are working. Sigh.

Doing a careful Diff in VSS doesn't highlight any differences. Sigh.

Funny thing is (maybe due to my ignorance) is that if I create a new form and copy all the code from the Designer.vb class from the problem form into the new form, the new form displays fine. Now I can go this route to overcome the present issue, but this just hurts my head. Anyone know a sure fire cause and 'clean' solution to this mess?

Thanks for your time.

Alex Cane  Tuesday, May 15, 2007 1:39 PM

Itis called the WSOD. I have many days fighting this. The cause - the form designer has some serious problems.

Try this. It is a pain but it will probably work around the form designer bugs.

1. Back up your project.

2. Close the designer. Open YourForm.Designer.vb and YourForm.vb in the code editor.

3. Start cutting code from the InitializeComponent() inOpen YourForm.Designer.vb and paste it into the LoadFrom section in YourForm.vb. Or put it in a new Sub and call it first thing from LoadForm. Start at the bottom of InitializeComponent() - which will probably have several thousand lines code.

4. Good luck mtm_kingNOSPAM_PLEASEa tYahoo.ccccom

Hey Hey  Tuesday, May 15, 2007 5:43 PM
I have been dealing with this for a week now. It doesnt really effect the operation of my program. I get rid of the error by going into my main form code, making a change (any change will do - like adding then deleting a space) then storing the change. VS2005 then allows me to edit my form. I get the error mostly when I save a change then go to my form. If I go to the form without saving the change, it doesnt give me the error. Kinda weird that I clear the problem by doing the same thing over again. Hope this helps someone. I would be very curious what it is about the designer and my program that is causing the problem. It seemed to all start when I added some third party software to my program.
zamnut6  Tuesday, June 26, 2007 2:00 AM
I've found that the best way of dealing with these problems is to attach to the Visual Studio (devenv.exe) process in another instance and set it to break on all CLR exceptions. One of the most common reasons for these errors is that one of your user controls /third party components throws an exception in the designer.
R1ck  Thursday, June 28, 2007 2:15 PM

Thanks zamnut6. It helped me. VS2008 over here and third party components on the form too.

IvanGB  Tuesday, November 04, 2008 2:11 PM
Thank you very much R1ck. That showed me the problem right away and I was able to fix it in a second.
Billy Bob Richert  Monday, May 11, 2009 2:33 PM

You can use google to search for other answers

Custom Search

More Threads

• How to implement color picker in canvas created using IDesignerHost
• listview column color
• Groupbox not retaining dimensions when inheriting tab control on form.
• How To Select A TreeNode With Code
• What is the differece between declaring Timer variable at design time and at run time?
• DataGridView and Graphics
• VS 2008 SP1 abstract Form/UserControl not working even when using Brian Pepin, Urban Potato, technique. Help...
• Argh: Label.Padding.All
• Line UserControl and Adorners
• PictureBox - Transparent - Expected behaviour?