VB6 Compile difference

Sep 27, 2010 at 3:46 PM

Hi  to everyone

i have a msbuild project with multiples vb dll  projects, they compile without any errors, but when  the programs runs , some of them present run time errors, in order to solve the problem ,i review project from vb6 IDE,compile re-install the application but this time, the issue is not present, this happend without change any single line of code.  then i created another MSBuild projetcs but this time containing only the project with the issue and compile, re-install the programs work perfectly, what i have notice if there is a diference in file size when i compile the MSBuild with multiples projects and the single one.

 

Any help, comments or suggestions are greatly appreciated

 

 

 

 

Coordinator
Sep 30, 2010 at 12:32 PM

Could you post more details / full exception stacks.

Mike

Sep 30, 2010 at 3:17 PM

Hi

Mike,

There is no errors in process of compilation, the problem is the following, i have a solution with any numbers of VB 6.0 projects part of the solutions is

<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks"/>
  <PropertyGroup>
    <ProjectsDir>c:\dev\app\trunk</ProjectsDir>
    <BinDir>c:\dev\app\trunk\dll</BinDir>
  </PropertyGroup>
  <ItemGroup>
    <ProjectsToBuild Include="$(ProjectsDir)\obj_Analisis_Reversas\objapp_Analisis_Reversas.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
    <ProjectsToBuild Include="$(ProjectsDir)\prog\app.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
    <ProjectsToBuild Include="$(ProjectsDir)\prog\app_Update.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
    <ProjectsToBuild Include="$(ProjectsDir)\obj_Archivos_Faltantes\objapp_Archivos_Faltantes.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
    <ProjectsToBuild Include="$(ProjectsDir)\obj_Archivos_Leidos\objapp_Archivos_Leidos.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
    <ProjectsToBuild Include="$(ProjectsDir)\obj_Compensacion\objapp_Compensacion.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
    <ProjectsToBuild Include="$(ProjectsDir)\obj_Consultas_ATM\objapp_Consultas_ATM.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>

....

the solution compile with exception, when i install the dlls, one of them present a run time error "activex can not create objtect", what i did to investigate the problem is compile again the project but

this time from VB 6 IDE, re-install the dll, and the solution not present the error.

Later i created another solution , but only with the project that presented the problem,

<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks"/>
  <PropertyGroup>
    <ProjectsDir>c:\Desarrollo\app\trunk</ProjectsDir>
    <BinDir>c:\Desarrollo\app\trunk\Main_Program</BinDir>
  </PropertyGroup>
    <ItemGroup>
    <ProjectsToBuild Include="$(ProjectsDir)\obj_Leer_Archivos\objapp_Leer_Archivos.vbp">
      <OutDir>$(BinDir)</OutDir>
      <ChgPropVBP>MajorVer=2;MinorVer=3;RevisionVer=0</ChgPropVBP>
    </ProjectsToBuild>
       </ItemGroup>
  <Target Name="Default">
    <!-- Build a collection of VB6 projects -->
    <MSBuild.ExtensionPack.VisualStudio.VB6 StopOnError="true" TaskAction="Build"  Projects="@(ProjectsToBuild)"/>
  </Target>

</Project>

 

again the project compile without any problem, i re-install the dll, but this time there is not run time error. so the main diference is when i compile the projects in group or alone with the MSBuild Extension.

Regards