Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / April 2005



Tip: Looking for answers? Try searching our database.

reference problem - compatibility

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MacDermott - 21 Apr 2005 13:25 GMT
I've got a standard vb project, which compiles to an exe.
It references a second project, which compiles to a dll.
I can compile them both, and they work fine together.
However, when I open just the main project in Visual Studio, and try to run
it, I get a compiler error "User-defined type not defined".  This refers to
a type which is defined in the dll.
If I add the dll project to the group, all works fine.
If I save the group, though, and re-open it, I get the same compiler error.
Removing the reference from the main project, then reinstating it solves the
problem.

The dll project is set to use binary compatibility.  I have compiled the
dll, moved a copy to a "compatibility" folder, and made sure the project's
compatibility property is pointed to that file, but the symptoms persist.

What could I be doing wrong?

TIA
    = Turtle
Ken Halter - 21 Apr 2005 16:34 GMT
> I've got a standard vb project, which compiles to an exe.
> It references a second project, which compiles to a dll.
[quoted text clipped - 19 lines]
> TIA
>     = Turtle

How old is the file you're pointing to for compatibility?... in other words,
are you absolutely sure that it contains all public methods/properties/etc ?
If not, that's the problem... Here's a quicky page that describes
compatibility settings.

Binary Compatibility
http://www.vbsight.com/BinaryComp.htm

If you're sure everything's setup correctly, try unregistering all
copies/versions of that DLL, run RegClean (or a similar utility) and
re-register only the latest version. Take that same file and use it as a
compatibility model.

Signature

Ken Halter - MS-MVP-VB - http://www.vbsight.com
Sign up now to help keep VB support alive - http://classicvb.org/petition
Please keep all discussions in the groups..

MacDermott - 22 Apr 2005 16:06 GMT
Thanks for your reply, Ken!

I just recompiled the dll now, copied it into the compatibility folder, and
reset the binary compatibility to point to that file.

I opened the project group which contains both the standard project and the
dll project; it wouldn't compile.  Deleted and reset the reference to the
dll; it compiled and ran.  Then I saved changes to both the project group
and the standard project, closed out VB, and re-opened the project group.
Again, it wouldn't compile until I removed and re-instated the dll.

What could be going on?
   = Turtle

> > I've got a standard vb project, which compiles to an exe.
> > It references a second project, which compiles to a dll.
[quoted text clipped - 32 lines]
> re-register only the latest version. Take that same file and use it as a
> compatibility model.
Ken Halter - 22 Apr 2005 16:32 GMT
> Thanks for your reply, Ken!
>
[quoted text clipped - 11 lines]
> What could be going on?
>    = Turtle

Sounds like a dirty registry. Do you have RegClean? It works wonders
sometimes (problems with a specific setup though. Running RegClean on a PC
that has both Win2k and Office2k will require you to insert the Office CD
before running VB)

This post contains a link to RegClean (freeware) if you don't have it....
http://groups.google.co.uk/groups?selm=%237L5iTbHEHA.2576%40TK2MSFTNGP09.phx.gbl
&output=gplain


Once your registry's clean, load the DLL project by itself, recompile, exit
VB and load the EXE project by itself, set the references and see if you can
compile. VB does "funny" things to the registry while it's running.

Signature

Ken Halter - MS-MVP-VB - http://www.vbsight.com
Sign up now to help keep VB support alive - http://classicvb.org/petition
Please keep all discussions in the groups..

MacDermott - 23 Apr 2005 03:37 GMT
Actually, this is a pretty clean machine.
I've only had the machine for a few weeks, and I think the problem has been
there from the beginning.
It existed on this machine's predecessor, too, but everything was loaded
fresh on the new machine; we didn't ghost anything over.
It's an XP Pro machine.

Do you still think RegClean is a good idea?
Could you be more specific about exactly what you think needs to be cleaned
up?

Many thanks!
   - Turtle

> > Thanks for your reply, Ken!
> >
[quoted text clipped - 18 lines]
>
> This post contains a link to RegClean (freeware) if you don't have it....

http://groups.google.co.uk/groups?selm=%237L5iTbHEHA.2576%40TK2MSFTNGP09.phx.gbl
&output=gplain


> Once your registry's clean, load the DLL project by itself, recompile, exit
> VB and load the EXE project by itself, set the references and see if you can
> compile. VB does "funny" things to the registry while it's running.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.