Feb 15, 2010 at 5:26 PM

great examples to learn saf,

Please help me resolve one error I am facing while running msbuild example of CreateWeb which I downloaded from codeplex. its giving error: The Saf task failed unexpectedly - Microsoft.Sharepoint.SPException : ""  contains illegal chacter ':'.

I passes the url "" in the url tag of macrotemplate.

Feb 15, 2010 at 5:46 PM

Hey up Dilraj

Few questions..

1. Can you send me the MSBuild Xml that you are using ?

2. Does exist as site collection ?

Have you specified the simplesite as a Url element in MSBuild ? e.g. <Url></Url> ??




Feb 15, 2010 at 8:18 PM
Edited Feb 15, 2010 at 8:20 PM

Actually - I think there may be something to change here....

If you look at the sample XML '' (click on the MSBuild tab) - you will see that there are 2 "Url" elements (one uppercase, one lowercase)

The Upper case "Url" is designed to specify the url that will return the relevant SharePoint Context (SPSite). (This is consistent for all MSBuild actions). This should be the absolute path e.g.

However, the lower case "url" is the one which describes the url for the new web (and is used by the Action). This should be a relative path to (the Url), not absolute. Can you see if you have these set correctly ?

If this is the problem, I will rename the lower case "url" to "RelativeUrl", bacause I think it's confusing.

BTW. Each Entity (class used for passing parameters to the action, is also documented). In your case please take a look at this :

Keep me updated,


Feb 18, 2010 at 12:28 PM

Hi Mark ,

Thanks for your help, I checked my site it does exists, and the url and URL tag was confusing me. I changed the url tag to relative url but I am still getting the same error. Please view my MSBuild xml as follows

<?xml version="1.0" encoding="utf-8"?>
<!-- Defines a 'SAF Macro' containiing 'Actions' to be run on 'Do' and 'Undo' -->
<!-- Please visit for more information. -->
<Project DefaultTargets="Do" xmlns="">
  <UsingTask AssemblyName="Collaboris.Saf, Version=, Culture=neutral, PublicKeyToken=182db3eac6a9e195" TaskName="Collaboris.Saf.Adapters.MSBuild.SAF" />
    <Macros Include="Collaboris.Saf.Actions.Wss.Web.CreateWeb.macroTemplate">
      <description>New Web created by SAF</description>
      <title>New Web title</title>
  <Target Name="Do">
    <SAF MacroPaths="@(Macros)" ProcessMode="Do" ContinueOnError="false" />
  <Target Name="Undo">
    <SAF MacroPaths="@(Macros)" ProcessMode="Undo" ContinueOnError="false" />