View previous topic :: View next topic |
Author |
Message |
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Tue Feb 13, 2007 12:48 am Post subject: Invalid Type Name when generating bindings |
|
|
I am trying to add an object binding to a tree I created some time ago.
In the Auto Generate Bindings dialog I enter the type name, but I receive the message:
Invalid Type Name
The entered type could not be resolved - perhaps you are missing a reference
If I try one of the types that already has a binding, I get the same message.
I don't see any of my types in the drop down list.
I have a reference to the DLL containing the types in the project. I tried removing and re-adding it, but it didn't make any difference.
How does it find the types? Any suggestions about why it can't find them and how to fix it? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 13, 2007 7:09 am Post subject: |
|
|
What version of Virtual Tree are you using? The type resolution mechanism is somewhat different in version 3 from that in version 2
If the reference to the library containing the types is a Project reference then you should ensure that the referenced Project is fully compiled and the types are publicly visible. If you are still not seeing the types listed then you could try exiting Studio and restarting. _________________ Infralution Support |
|
Back to top |
|
|
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Tue Feb 13, 2007 7:33 am Post subject: |
|
|
The version is 2.5.6.
The reference is a project reference, and is fully compiled. The types are publicly visible (wouldn't I have problems compiling with the existing types if they weren't? It compiles OK, it just doesn't see the types in the Virtual Tree editor)
I have tried restarting Visual Studio. I am using C++, if it makes a difference. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 13, 2007 8:01 am Post subject: |
|
|
There is a later version of Virtual Tree you can download and try (2.6.4) - but as far as I can see from the Release Notes the fixes since 2.5.6 don't impact on your problem.
Are you using Visual Studio 2003 or 2005?
Visual C++ may make a difference. Did you use the Auto Generation feature initially to generate the bindings?
This is probably only an issue with the Auto Generation at design time(given that your existing bindings work OK). You should still be able to add the bindings manually at design time using the bindings tab. _________________ Infralution Support |
|
Back to top |
|
|
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Tue Feb 13, 2007 10:07 am Post subject: |
|
|
Using Visual Studio 2003.
Setting up the bindings manually seems to work. I did use the auto generation function previously and it worked. It was more convenient than doing them manually. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 13, 2007 10:28 pm Post subject: |
|
|
I've just checked the behaviour of version 2.6.4 when used in a VC++ managed form. It is somewhat different to that under C# and VB. Types from referenced non-system libraries do not show up in the AutoGenerate drop down list. However I could still enter the name of a type from a referenced library and it was resolved and bindings autogenerated.
Can you tell whether something has changed in your project since you auto generated the bindings? Does the reference have CopyLocal set?
You could also try entering the assembly qualified name of the type (eg MyNamespace.MyType, MyAssembly) as this can assist the .NET runtime with correctly resolving typenames. _________________ Infralution Support |
|
Back to top |
|
|
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Wed Feb 14, 2007 6:25 am Post subject: |
|
|
Specifying the assembly name made it work. I do remember my types never appeared in the drop down list.
Copylocal is set to true.
Unfortunately there are a lot of things that have changed since I have added the original bindings, but I don't know which might have caused the problem. |
|
Back to top |
|
|
|