WSS 3.0, VS 2008

Working with Sharepoint, in most case we add reference to Microsoft.SharePoint.dll and

using Microsoft.SharePoint;

in code and at least.

To do it automatically, we can edit zipped Viusual Studio tempates, that are stored in

vsTemplatres
Let’s take ConsoleApplication.zip for example. Add “using Microsoft.SharePoint;” string in Program.cs file:

image1.png

and a tag for reference in ConsoleApplication.csproj:

<ItemGroup> 
 <Reference Include="System" /> 
 <Reference Include="System.Data"/> 
 <Reference Include="System.Xml" /> 
 <Reference Include="Microsoft.SharePoint" /> 
</ItemGroup>

Reference path should be included in windows “Path” variable,

isapi2015

in this case.

That’s all – now after Console Application creation – Sharepoint assembly is already included, and we can write SharePoint code right away.

Click below to expand comments form..