Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Code generation for property 'CellBindings' failed. Error

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Brian
Guest





PostPosted: Thu Aug 18, 2005 5:47 pm    Post subject: Code generation for property 'CellBindings' failed. Error Reply with quote

When using the Object Data Binding features in the VS.NET, the following error occurs when exiting the Virtual Tree Designer.

Code generation for property 'CellBindings' failed. Error was: 'Specified cast is not valid.'

I'm currently using version 2.0.1 but everything seemed to work fine with version 2.0.0. However, after rolling back to 2.0.0, the error is now appearing as well.

Let me know if you need anymore information.

BTW, This control is awesome!!!

Thanks,
Brian
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Aug 18, 2005 10:24 pm    Post subject: Reply with quote

This problem can arise if the Visual Studio designer uses a different version of the Infralution.Controls.VirtualTree DLL to that actually referenced by your code. This aliasing seems to cause some code serialization problems for the IDE.

There are two possible ways this can happen:

1. If you derive a new control class and try using the designer for the control in the same solution or project. In this case the IDE needs to have a reference to the DLL in order to display the designer for it - but your project/solution is recompiling that DLL.

2. Your project references to the Infralution DLLs have inadvertantly been changed to "CopyLocal". This is generally a bad idea for DLLs that are installed in the GAC as it can cause aliasing - the designer will pick the DLL from the GAC but the code will use the locally copied DLL. When you add a reference to a DLL that is in the GAC the IDE will set CopyLocal to false by default for this reason.

You can fix the first issue by ensuring that you exit the IDE and reload the solution before attempting to use the designer to edit instances of your derived control within the same project. This causes the IDE to load the correct latest version of the compiled DLL and you shouldn't then have any problems.

The second issue can be addressed by deleting the Infralution DLL references and readding them - checking that CopyLocal is set to false.

If you do get code generation errors when making changes in the designer make sure you don't save the changes to the form - as this will typically save incorrectly generated code that obliterates your previous settings.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group