Late binding com class

Late binding com class

Old forum URL:

dan_morey posted on Wednesday, November 23, 2011

I've create a my first assembly with CSLA business objects in. I have then created a seperate assembly with a com class in it that I'm using to join my business objects to vb6. So in my old vb6 program I late bind to the com class and I call the methods on that, without direct referencing the proper business objects (none of the com class functions return any custom classes)

Doing this I can successfully get data out of my business objects, but when I try and save them I get a run time error "Unable to find assembly" that looks like it is trying to get my business object component. However the vb6 component does reference the com class that does reference the business object component so I can't see what is going wrong.

Can anyone shed some light onto why this error occurs? I'm thinking that I don't know enough about how things work when they get referenced, as I've been confused by weird referencing behaviour before (probably only weird due to my lack of knowledge) .

dan_morey replied on Wednesday, November 23, 2011

I found that if I signed my assemblies and added them to the GAC then this error can be avoided.

Not sure if this is the only solution, but it suits me for now.

Copyright (c) Marimer LLC