开发者

MSBuild Create Virtual Directory on XP (IIS 5.1)

Our process for creating a new development (get latest, setup db, setup IIS directories w开发者_高级运维ith 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?


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

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜