http://msbuildextensionpack.codeplex.com/
Has a vb6 build task. HOWEVER, this is just a fancy wrapper for vb6.exe /make
.
Aka, the msbuild task helps build a command line like this:
C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe /MAKE /OUT "..\MyProjectFolder\MyOldSchoolVB6Project.vbp.log" "..\MyProjectFolder\MyOldSchoolVB6Project.vbp" /outdir" "..\MyProjectBuildResults\bin"
You don't need the msbuildextensionpack task necessarily, but I find it better to use in the long run.
(Your other option is to wire up an exec task and "hard call" the command line above.
THERE IS NO WAY TO BUILD a .vbp without VB6.EXE. Accept this fact and your world will make a little more sense.
I would suggest putting the absolute least common denominator vb6 installation on the build machine (aka, UNCHECK every option possible).
Then code up your .msbuild file.
Something like this:
( I do not define SourceFilesBaseDirectory or OutputBuildDirectory, fyi)
<PropertyGroup>
<!-- This allows a way to provide a few options for the library -->
<TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath>
<TPath Condition="Exists('$(ProgramFiles)\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks')">$(ProgramFiles)\MSBuild\ExtensionPack\MSBuild.ExtensionPack.tasks</TPath>
</PropertyGroup>
<Import Project="$(TPath)"/>
<ItemGroup>
<ProjectsToBuildIT001 Include="$(SourceFilesBaseDirectory)\MyProjectFolder\MyOldSchoolVB6Project.vbp">
<OutDir>$(OutputBuildDirectory)</OutDir>
</ProjectsToBuildIT001>
</ItemGroup>
<Target Name="BuildTheVBProjects001" >
<MSBuild.ExtensionPack.VisualStudio.VB6 TaskAction="Build" Projects="@(ProjectsToBuildIT001)"/>
</Target>
I personally do not like the vb6.exe on my primary build machine. But that's me.
Thank goodness .Net 2.0 and later came up with a way to build the code that did not rely on the IDE being installed.
The "hard call" looks something like this. You will be tempted to short-cut it and try it, it will probably work. But the task above is alot cleaner I believe.
<exec program="c:\myfolder\myexe.exe" failonerror="false">
<arg value="/MAKE" />
</exec>
This is just an example of course, it takes some tinkering to get it right.
But at the end of the day, vb6.exe has to exist on the build box ~~somewhere.
..