Search code examples
visual-studioweb-deployment-project

Web Deployment Project "AfterBuild" in Visual Studio 2008


I am experimenting with the build file that is part of a web deployment project. My goal is do something in the "AfterBuild" target. I am doing the following.

<Target Name="AfterBuild">
    <MakeDir Directories="$(TargetDir)\Upload" />
</Target>

For some reason the folder never gets created. Why is this happening?


Solution

  • I just realized I have a slash before the word upload which isn't necessary and that is what was causing the issue.

    "$(TargetDir)\Upload" <= wrong
    "$(TargetDir)Upload" <= right