VB6 Auto Build with TFS 2010

Jul 29, 2011 at 12:37 AM

Hi,

Were trying to build a vb6 project using TFS BUILD. The project builds fine except we need it to build the new .ocx based upon the old .ocx(projec compatability). Were using the script below to execute the build. Is there a parameter we need to turn on for compatability mode?

Thanks,

Larry

<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   
 <PropertyGroup>   
  <TPath>C:\Program Files\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks</TPath>   
  <TPath Condition="Exists('C:\Program Files (x86)\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks')">C:\Program Files (x86)\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks </TPath> 
 </PropertyGroup> 
 <Import Project="$(TPath)"/>  
 <PropertyGroup>   
  <VBPath>C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe</VBPath>   
  <VBPath Condition="Exists('C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.exe')">C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.exe</VBPath> 
 </PropertyGroup>  
 <ItemGroup>   
  <ProjectsToBuild Include="BoldControls.vbp">     
   <OutDir>$(OutDir)</OutDir>     
   <!-- Note the special use of ChgPropVBP metadata to change project properties at Build Time -->     
   <ChgPropVBP>RevisionVer=160;CompatibleMode="0"</ChgPropVBP>   
  </ProjectsToBuild> 
 </ItemGroup> 
 <Target Name="Default">   
  <!-- Build a collection of VB6 projects -->   
  <MSBuild.ExtensionPack.VisualStudio.VB6 TaskAction="Build" Projects="@(ProjectsToBuild)" VB6Path="$(VBPath)"/> 
 </Target>  
 <Target Name="clean">   
  <Message Text="Cleaning - this is where the deletes would go"/>     
 </Target> 
</Project>

Coordinator
Aug 25, 2011 at 6:58 PM

Hi Larry

Any progress? I don't have a vb6 project at hand to try this on, however what you are doing look right to me. Looking at http://stackoverflow.com/questions/489475/vb6-how-to-automatically-break-compatibility-from-command-line-or-msbuild it looks like you may need to pass in CompatibleEXE32 too.

Mike