471,326 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

How to view namespace of dependency?

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

Dec 16 '05 #1
9 2303
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

Brett Romero wrote:
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

Dec 16 '05 #2
Sorry I didn't mention it but that has already been done. No luck.

Thanks,
Brett

Dec 16 '05 #3
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.

Dec 16 '05 #4
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.

Dec 16 '05 #5
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
Dec 17 '05 #6
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

Dec 17 '05 #7
I recommend reading Richard Grimes' Fusion Workshop. It will give you a
solid understanding of the rules .NET uses to load assemblies.
http://www.grimes.demon.co.uk/workshops/fusionWS.htm

You might want to turn off the auto-increment build number feature too.
Set a specific AssemblyVersion in your AssemblyInfo.cs file (instead of
1.0.*). Clear your bin directories and then build everything again.

Joshua Flanagan
http://flimflan.com/blog
Dec 17 '05 #8
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

Dec 18 '05 #9
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.
Dec 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Tjerk Wolterink | last post: by
4 posts views Thread by cmay | last post: by
14 posts views Thread by Jon Rea | last post: by
3 posts views Thread by amitnicks | last post: by
10 posts views Thread by Sean Chambers | last post: by
2 posts views Thread by Mosfet | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.