This project is read-only.

MSBuild.ExtensionPack.VisualStudio.VB6 will not terminate correctly on windows server 2012 R2

Jan 22, 2015 at 2:23 PM

Running a msbuild script from Teamcity with a Teamcity agent on Windows 2012 r2.
In the script I call <MSBuild.ExtensionPack.VisualStudio.VB6 TaskAction="Build" Projects="@(ProjectsToBuild)"/>
This will only build one project, but when it starts its seems to hang - VB6 is started as a process, but i dont know whats happening in the background. It does not terminate - so I have to stop the process manually.

Any idea how to get around this problem?

MSBuild script
  <Target Name="Build Invoice VB6">
      <ProjectsToBuild1 Include="$(WorkDir)\VB6\Invoice\Invoice.vbp">
        <!-- Note the special use of ChgPropVBP metadata to change project properties at Build Time -->
    <!-- Build a collection of VB6 projects -->
    <MSBuild.ExtensionPack.VisualStudio.VB6 TaskAction="Build" Projects="@(ProjectsToBuild)"/>
Output in TC:
[22:18:04][Build All] CallTarget (51s)
[22:18:04][CallTarget] Build Invoice VB6 (51s)
[22:18:04][Build Invoice VB6] MSBuild.ExtensionPack.VisualStudio.VB6 (51s)
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] Building Projects Collection: 1 projects
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] START - Changing Properties VBP
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] AutoIncrementVer -> New value: 0
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] MajorVer -> New value: 3
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] MinorVer -> New value: 5
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] RevisionVer -> New value: 495
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] END - Changing Properties VBP
[22:18:04][MSBuild.ExtensionPack.VisualStudio.VB6] Running C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.exe /MAKE /OUT "E:\TeamCity\buildAgent\work\cdf263a9d594f0b8\VB6\Invoice\Invoice.vbp.log" "E:\TeamCity\buildAgent\work\cdf263a9d594f0b8\VB6\Invoice\Invoice.vbp" /outdir "E:\TeamCity\buildAgent\work\cdf263a9d594f0b8\Builds\Jobmatch\Invoice\"
Mar 13, 2015 at 10:03 PM
I am not sure if anyone has made any progress here, I had the same issue on windows 2012; I downloaded a copy of the source code for the vb6 task from the 4.0.10 release.

I temporarily removed the redirection of stdout and sterr, the vb6 compiler does not throw anything much anyways as long as a log file is provided (which the plugin specified by default).

Extract looks like this
            proc.StartInfo.FileName = this.VB6Path;
            proc.StartInfo.UseShellExecute = false;
            proc.StartInfo.RedirectStandardOutput = false;
            proc.StartInfo.RedirectStandardError = false;
I also removed related code that would read the streams to the end and post as Log.Message or Log.Error; after that I reran my build and now VB6 does not hang.

I guess this will be my workaround while this is officially supported on Windows 2012.

Apr 25, 2015 at 11:27 AM
Marked as answer by mikeFourie on 4/25/2015 at 3:27 AM