VSTA User Add In - Load Error
NFC
✭
in RobotStudio
Hi everybody,
namespace RobotStudioAddIn1
{
public partial class ThisApplication
{
// This method is called when the addin is loaded into RobotStudio.
public void AddInStartup()
{
// TODO: Add startup code here. Create toolbars, etc.
}
I was trying to code an add-in, using VSTA on RS 5.12.
Just for trying, I was building the empty C# template (code pasted below).
using System;
using ABB.Robotics.Math;
using ABB.Robotics.RobotStudio;
using ABB.Robotics.RobotStudio.Stations;
using ABB.Robotics.RobotStudio.Environment;
using ABB.Robotics.Math;
using ABB.Robotics.RobotStudio;
using ABB.Robotics.RobotStudio.Stations;
using ABB.Robotics.RobotStudio.Environment;
namespace RobotStudioAddIn1
{
public partial class ThisApplication
{
// This method is called when the addin is loaded into RobotStudio.
public void AddInStartup()
{
// TODO: Add startup code here. Create toolbars, etc.
}
// This method is called when the addin is unloaded from RobotStudio.
public void AddInShutdown()
{
// TODO: Add cleanup code here. Remove toolbars, etc.
}
public void AddInShutdown()
{
// TODO: Add cleanup code here. Remove toolbars, etc.
}
// Default sample Macro. Can be removed.
// Note: A Macro is defined as a "public void" method, with
// no arguments and with a name that starts with "Macro_"
// Other methods will not be visible from the Addin Browser.
public void Macro_Sample1()
{
// TODO: Define actions to perform when the Macro is invoked.
Logger.AddMessage(new LogMessage("Macro_Sample1 output window message."));
}
}
}
// Note: A Macro is defined as a "public void" method, with
// no arguments and with a name that starts with "Macro_"
// Other methods will not be visible from the Addin Browser.
public void Macro_Sample1()
{
// TODO: Define actions to perform when the Macro is invoked.
Logger.AddMessage(new LogMessage("Macro_Sample1 output window message."));
}
}
}
But when from RS "Add-ins" menu I try to "Load Add-In", following error is displayed:
RobotStudio .NET exception: Unknown Error: Load Add-In
============================================
Base exception: FileNotFoundException
Could not load file or assembly 'ABB.Robotics.RobotStudio.CustomContracts, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d4b3480564cc872e' or one of its dependencies. The system cannot find the file specified.
at ABBInternal.VstaServices.VstaAddIn.LoadAddInInProc()
at ABBInternal.VstaServices.VstaAddIn.Load()
at ABBInternal.StationManagement.VSTA.VstaCommands.VSTABrowser_ExecuteCommand(Object sender, ExecuteCommandEventArgs e)
at ABB.Robotics.RobotStudio.Environment.CommandBarButton.RaiseExecuteCommand()
============================================
Base exception: FileNotFoundException
Could not load file or assembly 'ABB.Robotics.RobotStudio.CustomContracts, Version=1.1.0.0, Culture=neutral, PublicKeyToken=d4b3480564cc872e' or one of its dependencies. The system cannot find the file specified.
at ABBInternal.VstaServices.VstaAddIn.LoadAddInInProc()
at ABBInternal.VstaServices.VstaAddIn.Load()
at ABBInternal.StationManagement.VSTA.VstaCommands.VSTABrowser_ExecuteCommand(Object sender, ExecuteCommandEventArgs e)
at ABB.Robotics.RobotStudio.Environment.CommandBarButton.RaiseExecuteCommand()
Some hint?
Thanks.
0
Comments
-
Hi,did you build your VSTA addin ?After building you should see your macro in RS://Volker0
-
Thank you for the answer,1) Yes I built it;2) What I see in RS is:Add Icon is slightly different and do not have any "+" sign near it.Nils.0
-
Hi Nils,
its seems like the assembly ABB.Robotics.RobotStudio.CustomContracts.dll can not be found in the Global Assembly Cache (GAC).
This assembly should be installed by the RobotStudio installer.Explore the GAC (C:WINDOWSassembly) and verify if the file exists:
The above picture shows parts of the GAC content on my test machine.
0 -
Hi,
thank you for your answer.I was searching the entire C drive for "ABB.Robotics.RobotStudio.CustomContracts.dll" without any result.Spite I have on my PC WinXp Pro SP2, please note that windows folder is "C:WINNT" and not "C:WINDOWS" ( I think it's an old I.T. department habbit since windows NT ).A) Non standard Win folder path, could mean something?Where can I fetch this dll and how can I manually install it?Thanks a lot,Nils.0 -
Hi Nils,the location can be "C:WINDOWSassembly" "C:WINNTassembly" depending on you operating system and installation.I'll mail you the assembly and you can install it by dragging it into the GAC folder. (Detach it to your desktop and drag it into c:winntassembly).Which version of RobotStudio did you have installed before you installed 5.12?The missing assembly seems like an installation problem.0
-
Yes Niklas!It works! I was just dragging how you suggested the "ABB.Robotics.RobotStudio.CustomContracts.dll" you sent me via email on "C:WINNTassembly".Started RS again and now it works.Previous RS version I had before 5.12 was 5.11.01.Thank you very much,Nils.0
This discussion has been closed.
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings