Hidden references in visual studio 2010 web site project
Asked Answered
C

1

7

When I create a new web site project (not web application) in VS 2010, it seems to have some dlls already referenced. If I try to add System, System.Core, System.Data, I get the error stating that "The Web site is already referencing the assembly 'System.Core'" etc. When I try to use a datatype from one of these assemblies, it seems to be recognized and I get intellisense and all. But I cannot see these dlls added in the Web.Config nor when I open the references tabs in the properties of the website. Is there any new secret place that these "Default" references are being added to?

Background Info:

The main reason I am trying to figure out these references is that I have migrated a project from VS 2008 to 2010 and I am getting build errors that System.Data.DatasetExtensions need to be refered. However, the reference is present in the web.config and I can also see the reference in the project properties. I also checked that it has the same version and same public key token as the build error. Below if the build error: error BC30007: Reference required to assembly 'System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.TypedTableBase`1'. Add one to your project.

Here is the reference in the web.config:

<?xml version="1.0"?>
<configuration>
    <system.web>
        <compilation debug="false" strict="false" explicit="true">
            <assemblies>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <authentication mode="Windows"/>
    </system.web>
</configuration>

I would really appreciate if someone can help me figure this out.

Thanks.

Notes: 1. I do not have the option of moving to a Web Application project. 2. In VS 2008, references from GAC were stored in Web.Config, Project references were stored in the solution file and other dll references were stored as .refresh files in the bin folder. I cannot find these dlls in any of the above places.

Contraction answered 25/1, 2012 at 20:17 Comment(0)
B
15

I had the exact same problem, and I eventually figured out the cause to mine was that I had copied a DLL to the project's BIN folder. Doing this causes Visual Studio to consider the DLL referenced. If you move the DLL outside of that folder, you'll be able to add the reference from within Visual Studio.

Bandolier answered 20/11, 2012 at 22:10 Comment(1)
I don't even have a Bin folder (I deleted it) and it's still complaining that the web site already had a reference.Rennes

© 2022 - 2024 — McMap. All rights reserved.