Most of us know that the main SharePoint classes live in Microsoft.SharePoint.dll. The easiest way to load this assembly is by using the ::LoadWithPartialName method thus releasing you from having to use the exact DLL name. In this case its obvious, but there are a couple of classes that are in DLLs that are not so obvious. Simply call the following:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint");
You can replace the "Microsoft.SharePoint" with any class name, provided its accessible on the system.
Enjoy
C
The SharePoint Knowledge Collection of Cornelius J. van Dyk, an 9 x SharePoint MVP
Subscribe to:
Posts (Atom)
Microsoft Authentication Library (MSAL) Overview
The Microsoft Authentication Library (MSAL) is a powerful library designed to simplify the authentication process for applications that conn...
-
Ever wondered what the new SharePoint Online URLs are all about? Take for example https://cjvandyk.sharepoint.us/:x:/r/sites/Site1... What ...
-
Have you ever started creating a list view in SharePoint and because you're experimenting, you chose to make it a "Private" vi...
-
When using NuGet, we can easily run into assembly reference issues. A notorious error message is: CS0012: The type ‘System.Object’ is def...