Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are project level imports stored in Visual Studio 2008?

I have a Web Service Application Project in Visual Studio 2008. This is supposed to be an ASP.Net 2.0 project and at some point this has been rebuilt using 3.5.

VS has kindly added in project level imports to System.Linq and System.Xml.Linq, but when I have re-targeted the project at 2.0 these project level imports have remained.

Because the Web Service Application Project does not have the detailed window for editing project references I cannot find how to remove these project level imports.

There is no .proj file which is where I would assume these were included.

I cannot now build the project as it fails, even though I only get warnings (no errors reported) such as this:

Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

Help would be much appreciated.

like image 895
Charlie Avatar asked Dec 06 '22 06:12

Charlie


2 Answers

Do the following

  • Right Click on the project and choose properties
  • Navigate to the References Tab
  • At the bottom of the page will be a "Imported Namespaces" group
  • Uncheck the namespaces you don't wanted imported
like image 134
JaredPar Avatar answered Dec 31 '22 05:12

JaredPar


You can do one of either two things.

1. In Visual Studio, expand the "References" folder and delete each offending reference by right-clicking and selecting delete.

2. Edit the project file and delete the offending references from their respective ItemGroup section.

like image 41
Andrew Hare Avatar answered Dec 31 '22 03:12

Andrew Hare