简体   繁体   中英

Using C# to access Sharepoint - where can I find the reference library?

I am currently writing a Windows application in C# that will add documents to a document library list. I am trying to reference Microsoft.Sharepoint, however I do not see the COM or .NET library inside visual studio 2005 add references lists. What dll do I need to reference and where can I find this?

Thanks,

Alex

To access a document library I would recommend going through the list web service which SharePoint exposes. From personal experience that is the easiest, most portable and upgradable way.

The documentation for ALL the web services and .NET libraries to do it as well can be download in Visual studio extensions for windows sharepoint services

to access the SharePoint library you have to include following assembly into your project: Microsoft.SharePoint.dll

You can find it on your SharePoint Server under the 12 hives folder: C:\\Program Files\\Common Files\\Microsoft Shared\\web server extensions\\12\\ISAPI

There you can find some more assemblies you might need for more SharePoint functionality.

What kind of application do you have to develop???

If it is a client application that will be execute on machines that are not the Sharepoint target machine you'll have to call to SharePoint web services to do the operations.

If your application will be executed on server, SharePoint machine, you can use the dll's that are on 12 folder. For developing, you'll have to copy the dll's on a local folder and reference them into your project. To check if the application works well have to be executed on the SharePoint machine not on the developing machine.

I assume you're using Sharepoint 2007, so you are able to find the libraries in the Bin folder in the 12 Hive on where SP is installed. That is usually: C:\\program files\\common files\\microsoft shared\\web server extensions\\12

You will need a reference to Microsoft.SharePoint.dll.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM