How to view namespace of dependency?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
B

Brett Romero

I have two projects in one solution - a library and executable. Each
have a namespace such as:

ROOT.myapp.Functional
ROOT.myapp.UI

However, each cannot reference the other. myapp.UI is dependent on the
library but only sees ROOT.myapp.UI and vice versa. How do I get them
to see each other's namespace?

Thanks,
Brett
 
In Visual Studio, from the ROOT.myapp.UI project, right click on the
project file and choose Add Reference... go to the Projects tab, and you
should see the ROOT.myapp.Functional project listed. Select it and press
OK. You should now be able to access ROOT.myapp.Functional from
ROOT.myapp.UI. (You do not want both projects referencing each other -
design your code so references only go one way. Which one references the
other is up to you - I just took a guess)

Joshua Flanagan
http://flimflan.com/blog
 
Which one have you added the reference to?

Rebuild both projects seperately and try again.

Also, check that the namespacing in the actual files is correct, as
well as the default namespacing for the project.
 
The EXE is referencing the library project. They are in the same
solution. Their default namespaces are as I described them above and
spelled correctly. I can rebuild the library fine but not the EXE
because of references to the library, which it doesn't see.
 
Maybe if you provided some sample code it would be more apparent what
your problem is. I'm betting on a typo or something as minor.

In the EXE code, make sure you type the full namespace qualified name of
the type you are referencing:
ROOT.myapp.Functional.SomeType
and are not trying to shortcut by doing something like:
Functional.SomeType
 
I found the problem but it produces more problems. I needed to
reference the DLL as well. That gives me access to the namespace. So
my question is: What good does it do to reference a "project" DLL?
I've removed the project DLL reference and see no difference.

Here's the new problem:
When setting to copy local = false: It will tell me A.dll is not found
or there is a problem with one of its references. A.dll is there and
so are all of its references.

However, I have it write to the event log. I see there it keeps trying
to look in my app's bin folder rather than in the referenced DLL's bin
folder (still have copy local=false). I have my project paths set
correctly but that doesn't seem to matter.

These errors occur when copy local=true:

Error: The dependency 'config, Version=1.0.2172.32099, Culture=neutral'
in project 'TrackUI' cannot be copied to the run directory because it
would conflict with dependency 'config, Version=1.0.2173.28515,
Culture=neutral'.

Error: The dependency 'config, Version=1.0.2173.28515, Culture=neutral'
in project 'TrackUI' cannot be copied to the run directory because it
would conflict with dependency 'config, Version=1.0.2172.32099,
Culture=neutral'.

Warning: The dependency 'Utilities, Version=1.0.2176.30402,
Culture=neutral' in project 'TrackUI' cannot be copied to the run
directory because it would overwrite the reference 'Utilities,
Version=1.0.2175.31063, Culture=neutral'.

I use to have a DLL reference named 'config'. That is gone. I did a
"Find in Files" search on my project with case matching for 'config'.
Nothing. So why the error? It's a run time error that occurs
immediately.

As for the Utilities error, that is a DLL I'm referencing. I reference
several other DLLs, which in turn reference 'config'. Could that be an
issue? Why would that come through in my project?

Thanks,
Brett
 
Thank Joshua. I didn't see anything addresses my specific problem.

Where can I find the fuslogvw.exe program? I didn't find a link for
it at Microsoft.

Thanks,
Brett
 
fuslogvw.exe is included in the .NET Framework SDK.

If you have Visual Studio, the SDK should have been installed. On my
system, the folder is:

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
or
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin

If you do not have the VS.NET or the SDK installed, you can download the
SDK from the Microsoft website.
 
Back
Top