RobotStudio event

VS C# Shutting down when editing code

Hi,

I am trying to create some customized addin code that contains a user control.  The problem that I am having is that I am unable to go into 'view designer' mode in order to change the control box in any way because when I try to go into 'view design' mode on just that particular control, I get the following message.  After the message shows, VS shuts down.


ErrorImage 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.


Could not load file or assembly 'ABB.Robotics.RobotStudio, Version=5.8.2028.1009, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Hide    


at ABB.Robotics.RobotStudio.Stations.Forms.ToolControlBase..cto r()

 

The original code started out by a small sample submitted by Johanes Weiman on creating a custom tool window.  This does the same thing.  In fact, the code will build and run fine.  I believe the following line of code is the problem:


public partial class myToolWindow : ABB.Robotics.RobotStudio.Stations.Forms.ToolControlBase

Has anyone else had any problem similar to this, and if so, how did you fix it.  THis is EXtremely frustrating.  Particularly since I was originally able to view and modify this control when I first starting editing it.  Came back to it after the weekend and all of a sudden I'm getting this problem. 

And it is not just contained to this computer.  I've tried to do the same thing on another computer and same problem.

I first went to Microsoft to find the anwer thinking that it was a Microsoft VS express problem, but haven't really round anything.  I have found some things similar, but nothing I've tried has solved the issue.  All the references to the ABB libraries are in place since the project builds and runs correctly.

Thanks.

Comments

  • One other thing that I noticed, is that if with the following lines of code:


    public partial class myToolWindow : ABB.Robotics.RobotStudio.Stations.Forms.ToolControlBase
    //public partial class myToolWindow : UserControl

    The first line where I am using the ABB, ToolControlBase is where I get the error when trying to go into 'view designer' mode.

    If I change it to use the second, commented line instead, I can view the form and make modifications at will without any problems.  Then when I'm reqdy to build the feature, I change it back to the first definition and everything is fine for the build.

    Seems strange to me why I have to take these steps, but any feedback on this would be great.

    Thanks.

  • PerSvensson
    PerSvensson ✭✭✭

    Hi
    What you can do is to create a new UserControl and design your GUI in that and then in the constructor of the control which is inherit from ToolControlBase you add that UserControl.
    Something like this (the UserControl is named 'MyDesignControl')

    MyDesignControl uc = new MyDesignControl();
    this.Controls.Add(uc);

    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering