views:

126

answers:

1

Our process for creating a new development (get latest, setup db, setup IIS directories with permissions) environment has got a little complicated and I want to automate it.

The only bit I am stuck on is creating an IIS Virtual Directory for the WCF service layer. We develop with windows XP (IIS 5.1) but will be moving to Windows 7 (IIS 7) soon.

Can anyone help please?

+1  A: 

You can use SDC tasks for XP. Here is a sample.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;

  <PropertyGroup>
    <TasksPath>$(MSBuildExtensionsPath)\MSBuildCommunityTasks\</TasksPath>
  </PropertyGroup>
  <Import Project="$(TasksPath)Microsoft.Sdc.Common.tasks"/>

  <Target Name="Demo">
    <Microsoft.Sdc.Tasks.Web.WebSite.CreateVirtualDirectory
      VirtualDirectoryName="SampleVDir"
      WebSiteName="Default Web Site"
      Path="C:\temp\SampleWeb"
      AppCreate="true" />
  </Target>
</Project>

Then to exeucte msbuild.exe CreateVDir.proj /t:Demo

Where CreateVDir.proj is the name of the file.

For IIS 7 you can use MSBuild Extension Pack.

Also if you're up to it, another option is MSDeploy which is the way I would do it.

Sayed Ibrahim Hashimi