I am trying to apply the example described in Paul Lefebvre blog post
I am using Visual Studio 2013, and encountering difficulties. I was able to start a new C## class as described, and rename the file to XojoTest.cs. Now I have trouble with VS no recognizing some of the code.
The default using created by VS are as follow :
I added as instructed (System is part of the default) :
VS complains that :
Error 1 The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) c:\\users\\michel\\documents\\visual studio 2013\\Projects\\XojoTest\\XojoTest\\XojoTest.cs 6 22 XojoTest
Then I paste the code as described, and I get another error :
Error 2 The name 'MessageBox' does not exist in the current context c:\\users\\michel\\documents\\visual studio 2013\\Projects\\XojoTest\\XojoTest\\XojoTest.cs 25 13 XojoTest
To go on with this and see how it goes on the Xojo side, I simply commented out the offending lines, and followed the instructions to make the build for x86 and Register for Interop. After which I built the DLL fine.
In the new Xojo project I was able to locate and add the Xojo Test reference fine. I placed the example code in a button and tried to run, then I got
There is no class by this name
Dim o As New XojoTest.InterfaceImplementation
Which I believe is the reason why there is no item by that name in the next line.
As you see, I am completely stuck. Ultimately, my goal is to be able to build a DLL that returns a string, but if this very simple example does not work, I am very far to get anything done.
I will very much appreciate any help.
Thank you in advance.