Web.WebSite.Exists doesn't return a value

Jun 19, 2009 at 6:41 PM

Here's the code I'm executing:

    <Target Name="CheckIfWebSiteExists">
        <Message Text="************ Inside CheckIfWebSiteExists" />

        <Web.WebSite.Exists Description="Healthcare.AdminSVC">
            <Output TaskParameter="DoesExist" PropertyName="WebSiteExists" />

The code executes fine, but the buildlog shows:

Target "CheckIfWebSiteExists" in file "D:\Builds\Healthcare\_testing\BuildType\TFSBuild.proj" from project "D:\Builds\Healthcare\_testing\BuildType\TFSBuild.proj":
Task "Message"
  ************ Inside CheckIfWebSiteExists
Done executing task "Message".
Using "Web.WebSite.Exists" task from assembly "C:\Program Files\MSBuild\SDCTasks\Microsoft.Sdc.Tasks.dll".
Task "Web.WebSite.Exists"
  Checking for Existence website 'Healthcare.AdminSVC' on: localhost
Done executing task "Web.WebSite.Exists".


How can I get a return value or some data to show whether the web site was or was not found?  I downloaded the SDC library no more than about two weeks ago.


Thank you.


Jul 17, 2009 at 7:12 AM

WebSiteExists is a boolean, so you can use it for conditional logic. if you want to see a result, use the message task, e.g.


<Message Text="WebSiteExists: $(WebSiteExists)"/>