Trouble converting projects from VS7.1 TO VS9 - Error BC30284

J

jnonly

Hello,

I recently converted projects from VS7.1 (2003) to VS9.0 (2008) and am
getting the following error on some subroutine declarations:

error BC30284: sub 'SomeSub' cannot be declared 'Overrides' because it
does not override a sub in a base class.

The subs on which this occurs have parameters of a type that comes
from an external COM library. I have added references to the library
to both the project containing the base class and the project
containing the derived class. Does anyone know what I have to do to
get rid of this error?

Thanks much,

Juan
 
F

Family Tree Mike

Is the base class a .Net 1.1 class? If it is a .Net 1.1 class, does it, and
especially the class' subroutine being overridden, exist unchanged in 3.5?
 
J

jnonly

No, the base class is our own.

However, I think I have identified the problem, but can't seem to fix
it. The problem seems to be that the paths for the reference to the
external library are different between the project containing the base
class and the project containing the derived class. When I add the
reference to the base class project (via the .NET tab), the path is to
a copy of the DLL located in the bin folder under the folder for my
Startup project. When I add the reference to the derived class
project--whether through the .NET tab or by browsing--the path is to
the original DLL located in a subfolder of Program Files\Common Files.

This library is third-party and a few years old, so I may need to
download a more recent version, but I don't think it should matter for
this problem. So, any ideas how I can get the two projects on the same
page? I'll keep messing around with it and maybe download a newer
version of the library.

Thanks, Juan
 
J

jnonly

I fixed my problem. I deleted the copy of the DLL, went through my
projects and fixed the references by browsing to the original. I don't
know if the references got messed up in converting the projects, if
the older compiler didn't care or if I did something to mess them up
after the conversion, but its working now! :)

Juan
 
J

jnonly

I fixed my problem. I deleted the copy of the DLL, went through my
projects and fixed the references by browsing to the original. I don't
know if the references got messed up in converting the projects, if
the older compiler didn't care or if I did something to mess them up
after the conversion, but its working now! :)

Juan
 
F

Family Tree Mike

It sounds like some kind of conflict going on in the settings regarding the
"copy local" property.

Generally though, I prefer having a multiproject solution in the scenario
you are describing. All of your projects would belong to one solution, and
that solution is where you work. I don't remember if VS 2003 allowed this,
it was so long ago...

The references you add then, are just references to the other projects. I
wouldn't add a reference to this 3rd party dll unless you needed it each
place. It should come along with the project which is dependent when you add
the reference to your project to it's derived project.
 
J

jnonly

Mike,

I do have a multiproject solution and yes, VS 2003 allows this.
However, your suggestion regarding references didn't workout for me. I
end up with 'not defined' (BC30002) and 'not referenced' (BC32004)
errors. Thanks anyway.

Juan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top