about setting references

T

Tony Johansson

Hello!

Assume I have a class library called Test.dll.
Then I can add a reference to this class library Test.dll in the section
"References"
This works fine.

Now to my question there is a Reference Path property page in the project
property where you can set a
reference path.

If I here for example set the path to my class library it will not work. I
get the following error.
Error 1 The type or namespace name 'Test' could not be found (are you
missing a using directive or an assembly reference?)
F:\C#\WindowsApplication5\ConsoleApplication1\Program.cs 15 13
ConsoleApplication1


So what is this Reference Path used for because it was not was I thought.

//Tony
 
T

Tony Johansson

Hello!

I have read this but it doesn't work.

I think this might be a bug.

//Tony
 
J

Jeff Johnson

I have read this but it doesn't work.

I think this might be a bug.

Clarify something for me: are you trying to set a reference path and then
use, for example

using <some assembly in that reference path>;

without actually adding a reference to it in the Add References dialog?
 
T

Tony Johansson

Hello!

I have a class library called Test.dll this is located in
F:\C#\Test\Test\bin\Debug
I just want to say that the normal action is to use add reference for the
component which alway work

If I for example place this class library Test.dll in project directory it
will not be found.
If I use the Reference Path property page in project property and set
Reference Path to F:\C#\Test\Test\bin\Debug
it will still not find the dll.

Here is the documentation and I have done what it says but it doesnt' work
Use the Reference Paths page to specify the folder path for assembly
references used by the project.

When the project system finds an assembly reference, it is resolved by
looking in the following locations, in order:

1.. The project directory. These files appear in Solution Explorer when
Show All Files is not in effect.

2.. Directories specified in this dialog box.

3.. Directories displaying files in the Add Reference Dialog Box.

4.. The project's obj directory. (Any assemblies created as a result of
adding a COM reference to your project are added to the project's obj
directory.)

//Tony
 

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