Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7158389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:03:27+00:00 2026-05-28T13:03:27+00:00

I am getting what I think is a bogus File Not Found error when

  • 0

I am getting what I think is a bogus “File Not Found” error when I do simple SharePoint 2010 client coding. It is not that I’m building to the wrong CPU type or the wrong .NET version. (I’m building to “any CPU” or “x64” and .NET 3.5.) I copied the Microsoft.SharePoint*.dlls from the server and put them in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI. (I’ve tried other folders too.) I then opened my Visual Studio 2010 project, right-clicked on References, clicked the Browse tab and added one or all of the dlls (I should only need Microsoft.SharePoint.dll.) This is the simple program I try to run:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace SPListsToConsole {
    class Program {
        static void Main( string[] args ) {
            using ( SPSite sc = new SPSite( "http://orsandbox01/SitePages/Home.aspx" ) ) {
                SPWeb site = sc.RootWeb;
                foreach ( SPList list in site.Lists ) {
                    if ( !list.Hidden ) {
                        Console.WriteLine( list.Title );
                    }
                }
            }
        }
    }
}

And here is the error I get:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Library, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.SharePoint.Library, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at SPListsToConsole.Program.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I haven’t done any SharePoint coding before but I’ve following all the instructions I can Google. TIA for any help you can share.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:03:29+00:00Added an answer on May 28, 2026 at 1:03 pm

    Use SharePoint web services instead of the object model

    If you need to work with a remote sharepoint server, you can use the web services instead of the object model.

    Assuming you have added a reference to the lists webservice (/_vti_bin/lists.asmx), and called it “Lists”, you can get a list of visible lists like this:

    Lists.Lists proxy = new Lists.Lists();
    
    // Use logged on users credentials to authenticate with SharePoint
    proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
    
    XmlNode listCollection = proxy.GetListCollection();
    
    foreach (XmlNode node in listCollection.ChildNodes)
    {
        bool hidden = bool.Parse(node.Attributes["Hidden"].Value);
    
        if (!hidden)
        {
           Console.WriteLine(node.Attributes["Title"].Value);
        }
    }
    

    You can find more details on the lists web service here:
    http://msdn.microsoft.com/en-us/library/lists.lists_methods.aspx

    Most of the things you can do with object model code can also be achieved using web services.

    Adding a reference to the web service

    To add a web reference in VS2010:

    1. Right click on the project node in Solution Explorer, and select Add Service Reference

    2. In the Add Service Reference dialog, click on Advanced…

    3. In the Service Reference Settings dialog, click on Add Web Reference…

    4. In the Add Web Reference dialog:

      a. For Url, enter the site collection url followed by _vti_bin/lists.asmx. For example:
      http://sharepoint/sites/mySiteCollection/_vti_bin/lists.asmx

      b. For Web reference name, enter Lists

      c. Click Add Reference

    The reference will now be added to the project, and you can use the code above to access it.

    To get lists from sub-site, change the services URL property to point to the web service for that sub-site by adding _vti_bin/lists.asmx to the sub-site’s url as above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think there is something that I'm just not yet getting about how these
I think I'm getting senile because I was convinced that to give a name
I keep getting a exc bad access error and I think it has something
I am getting this error for re-declaring saveorder() however, I don't think I am?!?
I think I'm getting a scoping error when using transformBy(), part of the doBy
I'm getting some cyclic reference (I think) problems between a few classes that require
I am not getting a tooltip to work and I think the problem is
I think I am not getting something right with JMS and JTA. I am
I think i'm getting crazy, im trying to compile a simple project to understand
I'm getting an undefined symbol error even though I think I've defined it okay.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.