Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Project Reference not working

Reply
Thread Tools

Project Reference not working

 
 
Hitesh Khatri
Guest
Posts: n/a
 
      07-07-2003
Hi All,
I have web application project, to which I have added
project-reference to another class library.

When I am using one of the property from that class. I am
getting following error.

'Public Overridable Overloads Property PropName() As
Project1.PropName' is declared in project 'Project1.dll',
which is not referenced by project 'WebProject.dll'.

I don't want to add direct reference to the dll file, I
want to use project reference. I also tried using Import
statement in my module but It didn't help too.

Please suggest a solution.

Regards,
Hitesh

 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      07-07-2003
Hi,

If 'Project1.dll' is the class library assembly you must make reference
to it, otherwise .Net donít know which assembly lo load.

If 'Project1.dll' isnít the class library but it assembly that the class
library used then check if the property that you call return ant type
declare in the 'Project1.dll' assembly. If so you also must make
reference to it.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Hitesh Khatri
Guest
Posts: n/a
 
      07-07-2003
Hi,
Thanks for responding to my question.

I am having one Web Project (VB.NET-WebProject.dll) and
one Class Library Project (VB.NET-Project1.dll) in my
Solution. In the Web Project, I have added 'Project
Reference' to the Class Library Project. The reference
property is also showing the correct path for the dll
(based on build config). Why .NET cannot load assembly
from that path.

You are suggesting that I must add direct reference to
Project1.dll and not 'Project Reference'. What is the use
of project reference?

I have different build config (Debug, Release etc.) setup
for my project. In case I add direct reference to the
dll, do I have to keep changing it when I switch the
build config? or should I just add reference to the dll in
the bin folder?

Thanks in advance for your help.
Regard,
Hitesh

 
Reply With Quote
 
Natty Gur
Guest
Posts: n/a
 
      07-07-2003
Hi,

>You are suggesting that I must add direct reference to Project1.dll and
>not
>'Project Reference'. What is the use of project reference?


No, What I meant is project reference. Any way if you reference the DLL
but ASP.NET not seems to load it check if the Copy Local property of the
reference set to true. If not set it to true. This will end up with a
copy version of the DLL in the Bin directory of your web application.

.Net looks for reference assembly in GAC and if the assembly not found
in the GAC in the Bin directory of the loading application. If the
assembly not found in those locations the CLR raise error.


Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does my webservice web reference not work in aspx project?! Eskimo ASP .Net Web Services 7 03-03-2008 06:17 PM
"Object reference not set to an instance of an object" Weird thing happens with reference a link nguyentrongkha@gmail.com ASP .Net 1 09-20-2007 09:46 PM
wifi not working on new hp, or not working after live update =?Utf-8?B?RHJhZ29ueA==?= Wireless Networking 1 10-01-2005 11:17 PM
Python Library Reference is tutorial, not reference aurora Python 6 10-18-2004 07:38 AM
How to tell if a reference is project or file reference from within the IDE? Darren ASP .Net 0 10-11-2004 12:51 AM



Advertisments