Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Presentation layer has reference to data layer (http://www.velocityreviews.com/forums/t380682-presentation-layer-has-reference-to-data-layer.html)

Ily 10-13-2006 08:21 AM

Presentation layer has reference to data layer
 
Hi all

I am using Visual studio 2005.

Im my project I have a presentation layer, a business layer and a data
access layer. From my business layer i have a reference to my data
layer. I also have a refeence to my business layer from my presentation
layer.

Now the weird thing is, I can create a form, and I can add a using
statement to my data layer, instantiate an object and call a method on
it - why is this? I dont have any refernce to my data layer - so how
does this happen? In any case - I dont want this behaviour - it didint
work like this in Visual Studio 2003! This is obviouslay undesired
behavior - anyone know why or how?


Chris Fulstow 10-13-2006 08:37 AM

Re: Presentation layer has reference to data layer
 
Maybe you need to remove the reference to your data access DLL from
your presentation project?

Ily wrote:
> Hi all
>
> I am using Visual studio 2005.
>
> Im my project I have a presentation layer, a business layer and a data
> access layer. From my business layer i have a reference to my data
> layer. I also have a refeence to my business layer from my presentation
> layer.
>
> Now the weird thing is, I can create a form, and I can add a using
> statement to my data layer, instantiate an object and call a method on
> it - why is this? I dont have any refernce to my data layer - so how
> does this happen? In any case - I dont want this behaviour - it didint
> work like this in Visual Studio 2003! This is obviouslay undesired
> behavior - anyone know why or how?



Robert Haken [MVP] 10-13-2006 08:40 AM

Re: Presentation layer has reference to data layer
 
If you use Web Site project type, then all the references AND THEIR
REFERENCES are copied into /bin/ folder. And because WebSite does not have
any .csproj file, where the refereces would be explicitly listed, it
automatically references all assemblies in /bin folder.

You have to use Web Application Project if you want the old (IMHO better)
project style.

Robert Haken [MVP ASP/ASP.NET]
HAVIT, s.r.o., www.havit.cz
http://knowledge-base.havit.cz


"Ily" <ilyas@igsoftwaresolutions.co.uk> píse v diskusním príspevku
news:1160727685.285552.261150@b28g2000cwb.googlegr oups.com...
> Hi all
>
> I am using Visual studio 2005.
>
> Im my project I have a presentation layer, a business layer and a data
> access layer. From my business layer i have a reference to my data
> layer. I also have a refeence to my business layer from my presentation
> layer.
>
> Now the weird thing is, I can create a form, and I can add a using
> statement to my data layer, instantiate an object and call a method on
> it - why is this? I dont have any refernce to my data layer - so how
> does this happen? In any case - I dont want this behaviour - it didint
> work like this in Visual Studio 2003! This is obviouslay undesired
> behavior - anyone know why or how?
>





All times are GMT. The time now is 05:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.