Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

c# WCF service reference to Lists.asmx complaining about Microsoft.SharePoint.dll

Posted on 2013-02-01
4
Medium Priority
?
859 Views
Last Modified: 2013-02-16
We have encountered a very odd issue and hopefully someone can shed some light on the issue.

We have a class library project that contains a service reference to the SharePoint Lists.asmx web service so that we can import task lists from SharePoint. I have been building and developing with this project for months in my development environment without any issues.

I do not have SharePoint installed on my workstation.
I do not have the Microsoft.SharePoint assembly on my workstation at all.

We have recently hired a new developer and we are trying to establish our solution in a new development environment. Everything builds more or less fine except for one particular project where we receive the following error:

Could not load file or assembly 'Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

Like I said earlier, I do not have this anywhere in my development environment, GAC, Windows Search does not find anything when searching for Microsoft.SharePoint*.*, and I have no issues on my workstation.

What could we be missing on the new workstation?
0
Comment
Question by:hmstechsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 38846572
Hi,
what type is the failing project?
Would it be possible to either ZIP and upload the failing project or to take screenshots of that project?
There will be somewhere a reference to SharePoint.

KR
Rainer
0
 
LVL 13

Expert Comment

by:Yagya Shree
ID: 38848568
To write SharePoint code you need:

SharePoint installed on your local development machine and this means you need to run Windows Server 2003 or Windows Server 2008. VPCs are available here. There is a SharePoint one, or you can get a smaller base and add WSS or MOSS to it.
Get Visual Studio 2005 Professional or above, the Visual Studio 2005 extensions for Windows SharePoint Services 3.0, v1.1 and the Visual Studio 2005 extensions for Windows Workflow Foundation (Visual Studio 2008 support is planned for June 2008).
Get the WSS SDK and the MOSS SDK. They are also available online for WSS and MOSS.
Start Visual Studio on your Windows Server machine that has SharePoint installed and create a new Windows Console Application. Yes there are SharePoint project templates, but I'm going for a fast first SharePoint program here and we don't need them yet.
If you are on Windows Server 2008 then make sure you started Visual Studio by right click and run as administrator.
Add a reference to Microsoft.SharePoint.dll (shown in references as Windows SharePoint Services)
Add a using Microsoft.SharePoint
Add this code:
        static void Main(string[] args)
        {
            // Update to your server name
            using (SPSite siteCollection = new SPSite("http://localhost"))
            {
                SPWebCollection site = siteCollection.AllWebs;
                foreach (SPWeb web in site)
                {
                    try
                    {
                        SPListCollection lists = web.Lists;
                        Console.WriteLine("Site: {0} Lists: {1}",
                            web.Name, lists.Count.ToString());
 
                        foreach (SPList list in lists)
                        {
                            Console.WriteLine("List: {0} {1}",
                                list.Title, list.ID.ToString());
                        }
                    }
                    //catch (Exception)
                    //{
                    //    // handle
                    //    throw;
                    //}
                    finally
                    {
                        web.Dispose();
                    }
                }
 
            } // dispose is called on site as a result of using()
            Console.WriteLine("Press ENTER to continue");
            Console.ReadLine();
        }
    9.    Run it with F5

This is all also described here in the WSS SDK.

Refer: http://blogs.msdn.com/b/pandrew/archive/2008/05/01/getting-started-with-sharepoint-development.aspx
0
 

Accepted Solution

by:
hmstechsupport earned 0 total points
ID: 38876064
We resolved this. We discovered a third-party assembly that had a dependency on this assembly. We have removed this third-party assembly from our project.

Thanks for all responses.
0
 

Author Closing Comment

by:hmstechsupport
ID: 38896144
Discovered on our own. Thanks to those who replied.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question