tags:

views:

872

answers:

4

Hi, Can anyone please help me in converting the below nant script to MsBuild Script?

http://localhost//Tupe path="${triad_web_src_code.dir}\T.csproj" />

If it is not a web solution then I need not map the solution & the msbuild could be like this :

But this is not working for Web project. So please help...

A: 
Microsoft.Sdc.Tasks.Web.WebSite.CreateVirtualDirectory
     VirtualDirectoryName="SampleVirtualDirectory"
     Path="$(PhysicalOutputPath)"
     WebSiteName="$(DefaultWebSiteName)" AppCreate="True" /

http://www.dotnetspider.com/resources/29209-MSBuild-Script-Sample-for-deployment-web.aspx

Should be what your looking for

ThatGuy
A: 

An alternative could be MSBuild Community Tasks it has the WebDirectoryCreate task that accomplishes the same thing.

Bas Bossink
Thanks Bas. We have MSBuild Community Tasks already integrated to our project. We will use that.
A: 

An alternative the the approaches listed above is to create use Web Deployment Projects (2005 2008) for this. They support creating virtual directories as well a pre-compiliation out of the box.

Sayed Ibrahim Hashimi
A: 

If you need to create both a virtual directory and an IIS application pool together you can do the following:

<Web.AppPool.Create 
  AppPoolName ="$(AppPoolName)" 
  IdentityType="NetworkService"/>

<Web.WebSite.CreateVirtualDirectory
    VirtualDirectoryName="$(WebServiceVirtualDirectoryName)" 
    Path="$(WebServiceVirtualDirectoryPath)" 
  AppPoolId="$(AppPoolName)"
    WebSiteName="$(WebServiceSiteName)" 
    Condition="!Exists('$(WebServiceVirtualDirectoryName)')"/>
Philippe Monnet