Page 1 of 1
plugin reference woes
Posted: Sun Oct 18, 2020 8:26 pm
by drtech
I can't seem to lick the :
"are you missing a directive or an assembly reference?"
error when compiling my plugin. It keeps giving me an error that opendental and opendentbusiness are not found, yet the references are there, the projects there, removed, added again, etc. No luck and I can't figure out why it is throwing this error and not allowing me to compile the plugin.
Any ideas that anyone has used to fix this issue?
Re: plugin reference woes
Posted: Mon Oct 19, 2020 11:02 am
by wjstarck
When this happens to me, it's usually because some change has been made in the full Open Dental solution and not just OpenDental and OpenDentBusiness, that OpenDental and OpenDentBusiness depend on. So I re-compile the whole Open Dental solution with all the projects, and then re-compile my Plugin. I usually quit and restart Visual Studio just for safe measure.
If that still doesn't work, I do a clean solution, then toss the bin and obj folders for all three projects (plugin, OpenDental, OpenDentBusiness). Then I make sure that all the references point to where they should be pointing. Then rebuild.
This seems to fix this problem. Hope that helps

Re: plugin reference woes
Posted: Tue Oct 20, 2020 8:01 am
by drtech
I am trying as you described and still seem to have issues, the references to OpenDental and OpenDentBusiness keep seeming to fail (the normal icon when I add the reference changes to a little ! icon next to it in Visual Studio after I try to compile...like the reference isn't pointing to the right place, but I can't figure out why this is happening...)
Re: plugin reference woes
Posted: Tue Oct 20, 2020 1:34 pm
by cmcgehee
When I have this issue, sometimes it helps to remove the project references and re-add them.
Re: plugin reference woes
Posted: Mon Oct 26, 2020 10:31 pm
by jordansparks
I think it's because you need to change the version of dot Net in your plugin to be newer, like 4.7.2.
Re: plugin reference woes
Posted: Thu Oct 29, 2020 11:50 am
by drtech
Jordan, YES! I actually figured that out last night before reading your response here after pulling my hair out for a few weeks. It helps to actually read the compiler output and not just the "error" tab on build....as I discovered it was actually telling me that in a round about way at the beginning of the build.. :p ...then come to find out you already posted about it here! Thanks.
Re: plugin reference woes
Posted: Sat Oct 31, 2020 3:18 pm
by jordansparks
I've never seen an informative message for that problem. I've repeatedly lost hours of time as I have to relearn that hard lesson.