'<name>' is declared in project '<projectname1>', which is not referenced by project '<projectname2>

N

noreponse1

Hello,

I have a solution that contains two projects. I have 2 dlls that these
projects use. Here's how it's set up:

Solution
-ProjectA
--References
---DLLA
-ProjectB
--References
---ProjectA
---DLLA
---DLLB

Note: DLLB references DLLA.

When I open the solution, the following message is shown:
'MyFunction' is declared in project 'DLLA', which is not referenced by
project 'ProjectB'.

As you can see from above, ProjectB does reference DLLA. I have
confirmed that the DLLA referenced in both ProjectA and ProjectB is the
exact same file.

I have found two workarounds for this problem:
1) In *ProjectA*, remove and readd the reference to DLLA. The message
goes away and I can compile.
2) If I reference the projects for DLLA and DLLB instead of the DLLs,
the message is never shown.

Workaround 1 is not acceptable, as I have to do this everytime I open
the solution. Workaround 2 is not acceptable, as DLLA and DLLB are used
in other projects, and I don't want to have to retest everytime I make
a change to them. I only want to update DLLA and DLLB if it's required
for the particular solution, at which time I can schedule regression
testing.

Background:
- DLLA contains generic functions that I reuse in just about every
project.
- DLLB contains WebUI specific function that I only use in the
presentation layer. This dll references DLLA.
- ProjectA is the business logic layer for my solution.
- ProjectB is the presentation layer for my solution.

I now have this problem in two different applications and I would
really like a solution for this. Any help would be appreciated.

Thanks,
Tim
 
N

noreponse1

Hello again,

I haven't gotten a response on this yet. I'd really appreciate some
help on this one.

Thanks,
Tim
 
H

harry

I meet such promble also.
I want use a Application tie to split the other DLL, and it is
referenced by the main application.
as

Project A
reference B

....

project B
reference DLLC
......
some class D:DLLC.C

...


and there is a public function f in Class DDL.C.

and i add the DLLC into bin of Project A,
when i build it , it will show such error .
f is declared in project 'DDLC", which is not referenced by project "B"
Why we must referenct the DDLC in project A ?
 
R

R. MacDonald

Hello, Tim,

Sorry that you're not getting any good feedback on this.

Also sorry that I don't have an answer for you. But I wonder if you
tried reversing the order of the projects in the solution if this would
"hide" the problem.

I hope you get a proper answer soon. I can see that neither work-around
is convenient.

Cheers,
Randy
 

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