Microstation Connect Edition update 6
Windows 7 SP1
Visual Studion 2015
target framework: 4.6.1
Hello Everyone,
I have developed testing C# AddIn but met a problem loading it. I have been searching through this forum and the Internet but did not find relevant information.
after keyin
MDL LOAD TESTCSADDIN,,TESTCSADDIN
I receive next .NET error message.
System.NullReferenceException: Object reference not set to an instance of an object.
at Bentley.MstnPlatformNET.AddIn.Load(String[] commandTail, IntPtr mdlDesc)
keyin
MDL LOAD TESTCSADDIN
works
What I did wrong?
source code:
using System.Windows.Forms;
using Bentley.MstnPlatformNET;
namespace TestCsAddIn
{
[AddInAttribute(MdlTaskID = "TestCsAddIn")]
internal sealed class TestCsAddIn : AddIn
{
private TestCsAddIn(System.IntPtr mdlDescriptor) : base(mdlDescriptor)
{
}
protected override int Run(string[] commandLine)
{
MessageBox.Show("Test message");
return 0;
}
}
}
Regards,
Alex