Hi All,
I'm trying to do a simple app in windows form vb.net to connect to a
sharepoint server.
Imports Microsoft.SharePoint
Overloads Sub Main(args() As String)
Dim siteCollection As New SPSite("http://Server_Name")
Dim sites As SPWebCollection = siteCollection.AllWebs
Dim site As SPWeb
For Each site In sites
Dim lists As SPListCollection = site.Lists
Console.WriteLine("Site: " + site.Name + " Lists: " +
lists.Count.ToString())
Next site
Console.WriteLine("Press ENTER to continue")
Console.ReadLine()
End Sub 'Main
My sharepoint server is in different box so I copy microsoft.sharepoint.dll
to my project but I'm getting this error:
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in
system.windows.forms.dll
Additional information: File or assembly name Microsoft.SharePoint, or one
of its dependencies, was not found.
Anyone can help me with this?
Tks in advance.
JFB