Freigeben über


Building “Classic ASP” applications with TFS 2008

As far as VS 2005 or VS 2008 are concerned, “Classic ASP” applications are just text files. You can edit them and you can check them in and out of version control. When people ask about managing “Classic ASP” applications with VSTS/TFS, they’re usually asking about how they should manage the VB6 components. Here’s what I recommend for VSTS/TFS 2008:

  • Download and install the latest MSSCCI provider for TFS 2008. This release lets the following clients perform version control operations against TFS: Visual Studio.NET 2003, Visual C++ 6 SP6, Visual Basic 6 SP6, Visual FoxPro 9 SP1, Access 2003 SP2, SQL Server 2005 Management Studio, Sparx Systems Enterprise Architect 6.1, Sybase PowerBuilder 10.5 and Toad for SQL Server 2.0.

    Note: If you have an earlier version of the MSSCCI provider installed, be sure to uninstall it before installing this version.

  • Check the “Classic ASP” application sources into TFS 2008 version control.

  • Create a TFSBuild.proj file to build the application and check it into version control. You’ll need to create this file manually since the Project File Wizard in Team Explorer only lets you target Visual Studio 2008 solutions and projects. The project file would look something like this:

     <?xml version="1.0" encoding="utf-8"?>
    <Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" />
    
      <PropertyGroup>
        <VB6>$(ProgramFiles)\Microsoft Visual Studio\VB98\VB6.exe</VB6>
        <VB6Output>$(BinariesRoot)\VB6\</VB6Output>
        <VB6Timeout>150000</VB6Timeout>
      </PropertyGroup>
    
      <ItemGroup>
        <ProjectToBuild Include="$(SolutionRoot)\Source\[ApplicationDirectory]\{application].vbp"/>
      </ItemGroup>
    
      <Target Name="AfterCompile">
    
        <Message Text="CompileProject: %(ProjectToBuild.Identity)"/>
        <MakeDir Directories="$(VB6Output)" Condition="!Exists('$(VB6Output)')"/>
    
        <Exec Condition=" '@(ProjectToBuild)'!='' "
           Command="&quot;$(VB6)&quot; /m &quot;%(ProjectToBuild.Identity)&quot; /outdir &quot;$(VB6Output)&quot; /out &quot;$(VB6Output)VB6.log&quot;"
           Timeout="$(VB6Timeout)"/>
    
      </Target>
    </Project>
    

    Thanks to Martin Woodward (Team System MVP) of Teamprise (provider of cross-platform TFS clients) for his suggestions to include the import of the Team Build targets file and to override the AfterCompile target. Of course, you can customize your project file as necessary to meet your requirements. Be sure to check out the MSBuild Extension Pack, Microsoft SDC Tasks, and the MSBuild Community Tasks Project for a number of helpful custom MSBuild tasks.

  • Create a new build definition and, on the Project File page, browse to the TFSBuild.proj file you just checked into version control.

    Project File

  • Queue a build of your newly created build definition and you should have a good build of your VB6 components.

That should put you well on your way towards building a “Classic ASP” application with VSTS/TFS 2008. Please let me know if you have any questions.

Note: I used an Online HTML escape tool to escape the project file snippet and Google Prettify to do the syntax highlighting.

Comments

  • Anonymous
    March 09, 2009
    I am not clear on whether we need  MSSCCI provider for TFS 2008. We are a Classic ASP and .NET shop. I figured out the development process for .NET apps. I need to deal with Classic ASP apps now. If i am using VS 2008 for classic asp apps., do i still need MSSCCI provider for TFS 2008? I thought MSSCCI provider for TFS 2008 is needed if i am still using Visual Studio 6.0 as my client and TFS for source control? can you please make it more clear for me.

  • Anonymous
    March 09, 2009
    If you're using Visual Studio 2008, you don't need the MSSCCI provider, you just need to install Team Explorer. If you don't have it handy, you can download it here: http://www.microsoft.com/downloads/details.aspx?familyid=0ED12659-3D41-4420-BBB0-A46E51BFCA86&displaylang=en