MSBuild task to build VB6

UPDATE: 01 Feb 2010 — This task is now available in the MSBuild Extension Pack

This is not something I thought I would write, but it seems that there are still many out there who have VB6 in their code base and need to have that code built as part of their build process. There are a few ways to do this, but the easiest would be to simply call a MSBuild task. I’ve therefore added a BuildVB6 task to the FreeToDev.MSBuild.Tasks.dll. Download the update with samples from here.


  • Projects [Required]: A collection of paths to the VB6 projects. The OutDir is optional and will default to what is set in the .vbp
  • VB6Path [Optional]: Defaults to C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe


<Project DefaultTargets=”Execute” xmlns=”″>
<Import Project=”FreeToDev.MSBuildTasks.tasks”/>
     <ProjectsToBuild Include=”C:\MyVB6Project.vbp”>
     <ProjectsToBuild Include=”C:\MyVB6Project2.vbp”/>
<Target Name=”Execute”>
     <BuildVB6 Projects=”@(ProjectsToBuild)”/>

NOTE: If you have used the Detokenise task, this release introduces an updated tasks file.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s