Geeks With Blogs
Mark Jones

One of the major areas developed for v2 of the SharePoint Action Framework (SAF) is its ability to integrate tightly with Msbuild. In order to get SAF working, you simply need to reference the Msbuild Saf task - which can be referenced like this :

<UsingTask AssemblyName="Collaboris.Saf, Version=, Culture=neutral, PublicKeyToken=182db3eac6a9e195" TaskName="Collaboris.Saf.Adapters.MSBuild.SAF" />

You may also choose to create a couple of targets (one for the Undo and one for the Do) - like this - but this is optional.

<Target Name="Do">
  <SAF MacroPaths="@(Macros)" ProcessMode="Do" ContinueOnError="false" />
<Target Name="Undo">
  <SAF MacroPaths="@(Macros)" ProcessMode="Undo" ContinueOnError="false" />


Now this is setup, you then need to create a few item groups where all the properties can be passed to.

    <Macros Include="Collaboris.Saf.Actions.Wss.Web.CreateWeb.macroTemplate">
      <description>New Web created by SAF</description>
      <title>New Web title</title>
      <webname>New Web name</webname>

For a more detailed walkthrough, please take a look at 'How to run a Macro from MSBuild '. You will find an example of how to call every SAF action in the documentation which can be accessed at here.

Posted on Thursday, February 18, 2010 9:23 PM | Back to top

Comments on this post: Automating SharePoint configuration with MSBuild and SAF

# re: Automating SharePoint configuration with MSBuild and SAF
Requesting Gravatar...
I agree, great share, thank you!
Left by collier d'ambre on Jan 25, 2011 11:21 PM

Your comment:
 (will show your gravatar)

Copyright © SAF | Powered by: