views:

43

answers:

4

We are facing a very weird situation using Visual Studio 2005:

There is a Web Site project we do have, and VS when compiling the project automagically adds some undesired references, like 'System.Data.Oracle' (we don't use Oracle at all, and never did) and things from asp.net 3.5 (the project is 2.0, we don't use in it anything related to the new version).

As a consequence of this, when putting the published site into the production server (configured for 2.0, without these strange dlls), the site doesn't work. Even if we remove these dependencies from Web.config file.

Have any of you ever seen something like this happening with your VS05?

Note: the bin folder doesn't have these dlls.

+2  A: 

Save your sanity and stop using Web Site Projects. They were an abomination from the get go.

The conversion to Web Application projects is well worth the effort.

Chris Lively
A: 

Are you precompiling the site prior to deploying it?

Paddy
Yes, Paddy. But to build is enough to VS automatically modify Web.config with these references.
Victor Rodrigues
+1  A: 

Are you using Visual Studio 2005 SP1? You should be. There are bug fixes in addition to the fact they added Web Application Projects back.

VS2005 isn't inventing these references. Something in your web site is using them.

John Saunders
I'm using VS 2008 SP1 and I still see this behavior at times.... rather unnerving.
marc_s
@marc: see his answer below. VS was doing the right thing, the OP just didn't realize it.
John Saunders
A: 

We could resolve it!

The web site project references a project.

This project had all these references, and the web site used them.. Removing the undesired references resulted successful ;)

Victor Rodrigues