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 : "http://SimpleSite.uk" contains
illegal chacter ':'.
I passes the url "http://SimpleSite.uk" in the url tag of macrotemplate.
Feb 15, 2010 at 4:46 PM
Hey up Dilraj
1. Can you send me the MSBuild Xml that you are using ?
2. Does http://simplesite.uk exist as site collection ?
Have you specified the simplesite as a Url element in MSBuild ? e.g. <Url>http://simplesite.uk</Url> ??
Feb 15, 2010 at 7:18 PM
Edited Feb 15, 2010 at 7:20 PM
Actually - I think there may be something to change here....
If you look at the sample XML 'http://www.collaboris.co.uk/saf/doc/Collaboris.Saf.Actions.Wss.Web.CreateWeb.html' (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,
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 http://www.collaboris.co.uk/Saf/Doc/default.html for more information. -->
<Project DefaultTargets="Do" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyName="Collaboris.Saf, Version=220.127.116.11, Culture=neutral, PublicKeyToken=182db3eac6a9e195" TaskName="Collaboris.Saf.Adapters.MSBuild.SAF" />
<description>New Web created by SAF</description>
<title>New Web title</title>
<SAF MacroPaths="@(Macros)" ProcessMode="Do" ContinueOnError="false" />
<SAF MacroPaths="@(Macros)" ProcessMode="Undo" ContinueOnError="false" />