There is no stack trace or error line information available for this error

I have a UserControl that is part of a Class library. I reference this project from my solution. This adds a control from the referenced project to my toolbox. I add tghe control to a form. Everyth...

I have a UserControl that is part of a Class library. I reference this project from my solution. This adds a control from the referenced project to my toolbox. I add tghe control to a form. Everything looks good, I compile all and run. Perfect…

But when I close the .frm with the control on it and re-open it, I get this error. The code continues to run.

It may have something to do with namespaces. The original namespace was simply «Design» and this was ambiguous and conflicting so i decided to rename it. I think that’s when my problems began.

    To prevent possible data loss before loading the designer, the following errors must be resolved:   



    2 Errors   

  Ignore and Continue   
    Why am I seeing this page?   





   Could not find type 'Besi.Winforms.HtmlEditor.Editor'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.     




Instances of this error (1)  

1.   There is no stack trace or error line information available for this error.  


Help with this error  

Could not find an associated help topic for this error. Check Windows Forms Design-Time error list   


Forum posts about this error  

Search the MSDN Forums for posts related to this error   






   The variable 'Editor1' is either undeclared or was never assigned.     Go to code  





Instances of this error (1)  

1.   BesiAdmin frmOrder.Designer.vb Line:775 Column:1   Show Call Stack  

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)  

Help with this error  

MSDN Help   


Forum posts about this error  

Search the MSDN Forums for posts related to this error   

Peter Lang's user avatar

Peter Lang

53.7k27 gold badges149 silver badges161 bronze badges

asked Jun 11, 2010 at 5:04

Chad's user avatar

A few things to try:

  • Check your frmOrder.Designer.vb file for errors, or possibly using the wrong namespace. I know it probably says not to touch the file in a comment, but sometimes you have to. Just be careful.

  • Try cleaning/rebuilding your project if you can.

  • Remove and re-add the reference to your dll (and make sure you’re referencing the right version with the right namespace). Maybe something is cached that shouldn’t be.

  • Exit and restart VS.

answered Jun 11, 2010 at 5:17

lc.'s user avatar

lc.lc.

112k20 gold badges157 silver badges185 bronze badges

4

I had this issue and came across this article in addition to others.

The sum of what I did was close VS, delete .SUO files and bin/obj directories — this resolved several, but not all of the designer errors. I also looked at my Designer.cs file and, in my case, found some variable declarations that were NOT pre-fixed with namespaces (i.e. private TabControl tabs_main; instead of private System.Windows.Forms.TabControl tabs_main;), so I edited the design file to include the full namespace and re-built. That solved this issue for me.

Meryovi's user avatar

Meryovi

6,0415 gold badges40 silver badges65 bronze badges

answered May 1, 2014 at 18:34

Sir-Hack-A-Lot's user avatar

In my case, I needed to build the project before the designer could see the custom object. Unfortunately, I was building 64-bit and debugging on a 32-bit computer, so it wasn’t really rebuilding in the same mode. Once this was resolved, the designer was able to show my custom objects without complaint.

answered Jun 7, 2011 at 19:45

Tony's user avatar

My problem was with System.Windows.Forms, so I removed it from references, compiled, then added it back in. The form now appears in it’s designer. Problem solved.

answered Jun 6, 2013 at 15:31

Jerry's user avatar

JerryJerry

6,2258 gold badges33 silver badges50 bronze badges

In my case, the error message in the designer mentioned a particular DLL. I remove that DLL from «References» and then re-add it. Form designer works for a while, then, if I reopen the form (or control).

But the problem comes back, and I have to repeat.

answered Oct 2, 2013 at 21:31

jm.'s user avatar

jm.jm.

23.2k22 gold badges78 silver badges93 bronze badges

1

In my case, it appeared that making the .resx file writable (it was originally readonly due to SSC) cleared up the problem. Interestingly, though, no changes were ultimately made to the resource file.

Cleaning, rebuilding, restarting, deleting the /bin and /obj folders did not seem to make any difference.

nobody's user avatar

nobody

19.7k17 gold badges56 silver badges77 bronze badges

answered May 23, 2013 at 19:03

Andy S.'s user avatar

Andy S.Andy S.

791 silver badge4 bronze badges

In my case, in debug mode form design can not be displayed and give errors «component reference can not be found». however in release mode everything is ok. I have changed settings of debug configuration as follows:

platform target : Any CPU

Now form design can be opened and displayed without any error in debug mode.

answered Oct 21, 2019 at 7:23

bykral's user avatar

In my case (in VS 2005), I had an ImageList that was bound to Tab Pages of a Tab Control.
In the Form1.Designer.cs I deleted the images from ImageList :

        ...
        // 
        // imageList
        // 
        this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
        resources.ApplyResources(this.imageList, "imageList");
        this.imageList.TransparentColor = System.Drawing.Color.Transparent;
        ...

and in the Form1.cs constructor I added the images for the ImageList and added the bindings (indexes):

    public Form1()
    {
        InitializeComponent();

        this.imageList.Images.Add(TemNyilv.Properties.Resources.plus);
        this.imageList.Images.Add(TemNyilv.Properties.Resources.pencil);
        this.imageList.Images.Add(TemNyilv.Properties.Resources.date_previous);
        this.imageList.Images.Add(TemNyilv.Properties.Resources.users_men_women);
        this.imageList.ImageSize = new System.Drawing.Size(32, 32);

        tabPage1.ImageIndex = 0;
        tabPage2.ImageIndex = 1;
        tabPage3.ImageIndex = 3;
        tabPage4.ImageIndex = 2;
        ...
    }

This is the second time I had this problem. (The second time I had the same problem when I tried to bind ImageList to a CustomImageComboBox)

I hope it helps others.

answered May 20, 2020 at 10:23

Molnar Istvan's user avatar

I have a UserControl that is part of a Class library. I reference this project from my solution. This adds a control from the referenced project to my toolbox. I add tghe control to a form. Everything looks good, I compile all and run. Perfect…

But when I close the .frm with the control on it and re-open it, I get this error. The code continues to run.

It may have something to do with namespaces. The original namespace was simply «Design» and this was ambiguous and conflicting so i decided to rename it. I think that’s when my problems began.

    To prevent possible data loss before loading the designer, the following errors must be resolved:   



    2 Errors   

  Ignore and Continue   
    Why am I seeing this page?   





   Could not find type 'Besi.Winforms.HtmlEditor.Editor'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.     




Instances of this error (1)  

1.   There is no stack trace or error line information available for this error.  


Help with this error  

Could not find an associated help topic for this error. Check Windows Forms Design-Time error list   


Forum posts about this error  

Search the MSDN Forums for posts related to this error   






   The variable 'Editor1' is either undeclared or was never assigned.     Go to code  





Instances of this error (1)  

1.   BesiAdmin frmOrder.Designer.vb Line:775 Column:1   Show Call Stack  

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)  

Help with this error  

MSDN Help   


Forum posts about this error  

Search the MSDN Forums for posts related to this error   

Peter Lang's user avatar

Peter Lang

53.7k27 gold badges149 silver badges161 bronze badges

asked Jun 11, 2010 at 5:04

Chad's user avatar

A few things to try:

  • Check your frmOrder.Designer.vb file for errors, or possibly using the wrong namespace. I know it probably says not to touch the file in a comment, but sometimes you have to. Just be careful.

  • Try cleaning/rebuilding your project if you can.

  • Remove and re-add the reference to your dll (and make sure you’re referencing the right version with the right namespace). Maybe something is cached that shouldn’t be.

  • Exit and restart VS.

answered Jun 11, 2010 at 5:17

lc.'s user avatar

lc.lc.

112k20 gold badges157 silver badges185 bronze badges

4

I had this issue and came across this article in addition to others.

The sum of what I did was close VS, delete .SUO files and bin/obj directories — this resolved several, but not all of the designer errors. I also looked at my Designer.cs file and, in my case, found some variable declarations that were NOT pre-fixed with namespaces (i.e. private TabControl tabs_main; instead of private System.Windows.Forms.TabControl tabs_main;), so I edited the design file to include the full namespace and re-built. That solved this issue for me.

Meryovi's user avatar

Meryovi

6,0415 gold badges40 silver badges65 bronze badges

answered May 1, 2014 at 18:34

Sir-Hack-A-Lot's user avatar

In my case, I needed to build the project before the designer could see the custom object. Unfortunately, I was building 64-bit and debugging on a 32-bit computer, so it wasn’t really rebuilding in the same mode. Once this was resolved, the designer was able to show my custom objects without complaint.

answered Jun 7, 2011 at 19:45

Tony's user avatar

My problem was with System.Windows.Forms, so I removed it from references, compiled, then added it back in. The form now appears in it’s designer. Problem solved.

answered Jun 6, 2013 at 15:31

Jerry's user avatar

JerryJerry

6,2258 gold badges33 silver badges50 bronze badges

In my case, the error message in the designer mentioned a particular DLL. I remove that DLL from «References» and then re-add it. Form designer works for a while, then, if I reopen the form (or control).

But the problem comes back, and I have to repeat.

answered Oct 2, 2013 at 21:31

jm.'s user avatar

jm.jm.

23.2k22 gold badges78 silver badges93 bronze badges

1

In my case, it appeared that making the .resx file writable (it was originally readonly due to SSC) cleared up the problem. Interestingly, though, no changes were ultimately made to the resource file.

Cleaning, rebuilding, restarting, deleting the /bin and /obj folders did not seem to make any difference.

nobody's user avatar

nobody

19.7k17 gold badges56 silver badges77 bronze badges

answered May 23, 2013 at 19:03

Andy S.'s user avatar

Andy S.Andy S.

791 silver badge4 bronze badges

In my case, in debug mode form design can not be displayed and give errors «component reference can not be found». however in release mode everything is ok. I have changed settings of debug configuration as follows:

platform target : Any CPU

Now form design can be opened and displayed without any error in debug mode.

answered Oct 21, 2019 at 7:23

bykral's user avatar

In my case (in VS 2005), I had an ImageList that was bound to Tab Pages of a Tab Control.
In the Form1.Designer.cs I deleted the images from ImageList :

        ...
        // 
        // imageList
        // 
        this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
        resources.ApplyResources(this.imageList, "imageList");
        this.imageList.TransparentColor = System.Drawing.Color.Transparent;
        ...

and in the Form1.cs constructor I added the images for the ImageList and added the bindings (indexes):

    public Form1()
    {
        InitializeComponent();

        this.imageList.Images.Add(TemNyilv.Properties.Resources.plus);
        this.imageList.Images.Add(TemNyilv.Properties.Resources.pencil);
        this.imageList.Images.Add(TemNyilv.Properties.Resources.date_previous);
        this.imageList.Images.Add(TemNyilv.Properties.Resources.users_men_women);
        this.imageList.ImageSize = new System.Drawing.Size(32, 32);

        tabPage1.ImageIndex = 0;
        tabPage2.ImageIndex = 1;
        tabPage3.ImageIndex = 3;
        tabPage4.ImageIndex = 2;
        ...
    }

This is the second time I had this problem. (The second time I had the same problem when I tried to bind ImageList to a CustomImageComboBox)

I hope it helps others.

answered May 20, 2020 at 10:23

Molnar Istvan's user avatar

  • Remove From My Forums
  • Question

  • I’m receiving the following error when attempting to re-open the Form Designer for my ‘main’ form. The main form contains 2 dialog forms and i can open the designer for those forms, but not the main form. The application runs and there are no errors, just a warning indicating the same message as the error shown below. I’m using VS08 Pro.

    To prevent possible data loss before loading the designer, the following errors must be resolved:
    Why am I seeing this page?
    Could not find type ‘System.Collections.Generic.List’. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.
     
    Instances of this error (1)
    1. There is no stack trace or error line information available for this error

    Any assistance would be appreciated.

    Thanks,

    -Jim

Answers

  • That error, or someting similar, usually appears for a couple of reasons.  The form.designer.cs file has been manually edited.  Or form layout code is in a separate file, but it is not the contained in the first class declared within that file.  Sometimes having more than one class in a file that contains layout code can cause it, too.

    Rudedog

  • Hi! — Jim

    I think that, what Visual Studio 2008 is telling you is that you need to add a refernce called:

    To do that, you must do the following steps:

    Start Microsoft Visual Studio first 

    1. Start Microsoft Visual Studio 2008.

    2. Open the project.

    To add a reference in Visual C#

    1. In Solution Explorer, right-click on the project node and click Add Reference.

    2. In the Add Reference dialog box, select the tab indicating the type of component you want to reference.

    3. Select the components you want to reference, then click OK.

    Here is also anther way you could do it on

    Figure1:1 Add a new reference.

    Next add this code to your application:

    Code Snippet

    Using System.Collections.Generic.List;

    I hope this information have solved your problem

    I wish you The best Of luck….

I am using MSVS 2012 Pro on a Windows 7 64 bit system for AutoCAD MAP 2015. I am trying to reconstruct a VBA routine into a VB .NET. When I initalize the form I enumerate a sepecific folders subfolders into a combobox. Actually the routine seems works okay in AutoCAD. MSVS 2012 Pro is the one throwing the error.If you go into the design view of the form it throws an error. Which is not a big probelm If you create the whole form then program it I guess. If in the design view I press continue to ignore the error it erases all my added code. I am learning as I go so it is a bit fustrating.

Imports System.IO
Private Sub InitializeComponent()

»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
Dim RootFolder As String
Dim i As Integer
Dim CFolder As String

RootFolder = «c:AppsBlocks»
If Directory.Exists(RootFolder) Then
Dim Tier1 As System.Collections.Generic.IEnumerable(Of String)
Tier1 = System.IO.Directory.EnumerateDirectories(RootFolder)
Me.ComboBox1.Items.Clear()
For i = 0 To Tier1.Count

******* If I unremark this it throws the error 

              CFolder = Tier1(i)

********
‘CFolder = Replace(CFolder, RootFolder, «», 1, -1, 1)
‘CFolder = Replace(CFolder, «», «», 1, -1, 1)
‘If CFolder <> «» Then
‘ Me.ComboBox1.Items.Add(CFolder)
‘End If
Next i
‘If Me.ComboBox1.Items.Count > 0 Then
‘Me.ComboBox1.SelectedIndex = 0
‘End If
End If
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»

End Sub

Message 1 Could not find type ‘System.Linq.Enumerable+ElementAtOrDefault’.
Please make sure that the assembly that contains this type is referenced.
If this type is a part of your development project, make sure that the
project has been successfully built using settings for your current platform or Any CPU.

Instances of this error (1)

Call Stack
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)

  • Home
  • VBForums
  • Visual Basic
  • Visual Basic .NET
  • Problem with my custom controls

  1. Jul 4th, 2014, 01:16 AM


    #1

    a_ahmed is offline

    Thread Starter


    Hyperactive Member


    Problem with my custom controls

    So I have added a custom numerical textbox as per one user here and my own double buffered picturebox as dbpicturebox. Both are classes of their own and show up just fine under controls, add fine, work fine.

    However… every once in a while as I’m working on the form designer i pops up the warning that something’s wrong and when I go to the code it says WindowsApplication.numerictexbox with red underline… then when i click on options it allows me to switch it to just = numerictextbox

    Why is this happening all the time what have I missed out on creating my custom control?

    I’ve done obviously a clean/rebuild a thousand times by now so it’s not that…


  2. Jul 4th, 2014, 01:30 AM


    #2

    a_ahmed is offline

    Thread Starter


    Hyperactive Member


    Re: Problem with my custom controls

    So in the MainWindow.Designer.vb it errors with:

    Code:

    Me.txtStoreID = New TDLHelpdeskToolKit.numericTextbox()

    I have to then go into the code and change it to:

    Code:

    Me.txtStoreID = New numericTextbox()

    Then program compiles and runs.

    While normally other standard textboxes are:

    Code:

    Me.ipDtTimer = New System.Windows.Forms.TextBox()

    I have

    Code:

    Public Class numericTextbox
        Inherits System.Windows.Forms.TextBox

    in numericTextbox.vb class


  3. Jul 4th, 2014, 02:02 AM


    #3

    Re: Problem with my custom controls

    Do you have two classes with the same name, perhaps in different projects?


  4. Jul 4th, 2014, 11:24 AM


    #4

    a_ahmed is offline

    Thread Starter


    Hyperactive Member


    Re: Problem with my custom controls


  5. Jul 21st, 2014, 08:18 PM


    #5

    a_ahmed is offline

    Thread Starter


    Hyperactive Member


    Re: Problem with my custom controls

    Haven’t had this issue in a while but just happened today and now designer won’t open on my main form. Driving me nuts, will have to restore a backup to get it working again. I use three custom controls now and voila:

    The variable ‘txtStoreID’ is either undeclared or was never assigned. Go to code

    Instances of this error (1)

    1. MainWindow.Designer.vb Line:1947 Column:1 Show Call Stack

    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSeri alizationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSeri alizationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSeria lizationManager manager, CodeStatement statement)

    Help with this error

    MSDN Help
    Forum posts about this error

    Search the MSDN Forums for posts related to this error
    Could not find type ‘HelpDeskToolkit.Label_Transparent’. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.
    Instances of this error (1)

    1. There is no stack trace or error line information available for this error.
    Could not find an associated help topic for this error. Check Windows Forms Design-Time error list
    The variable ‘ProgressLabel’ is either undeclared or was never assigned.

    I rebuilt the solution several times… and the transparent label isn’t even a class I wrote, I just added it and rebuilt. Worked fine until now.

    if I ignore and continue the design form won’t load at all from thereon and will just show the designer code.

    Why’s it keep breaking?


  • Home
  • VBForums
  • Visual Basic
  • Visual Basic .NET
  • Problem with my custom controls


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

Понравилась статья? Поделить с друзьями:
  • There is another instance of doom running как исправить
  • There is an error to run the application the smartaudio application will be terminated
  • There is an error in your submission перевод
  • There is an error in the smart detection как исправить
  • There is an error in the pool configuration exit