2

I have a visual studio solution with about 8 projects. 6 csproj and 2 vsxproj. I had to migrate the proj files from VS 2010 to VS2017. So i started using the latest msbuild version for vs2017.

Faced a new post build error after this, that first says,

    Done executing task "CL".
Task "CL"
  Read Tracking Logs:
    T:\components\collectors\buildoutput\x64\Release\tmp\hp-scom-.10EE536C.tlog\CL.read.1.tlog
  Outputs for C:\USERS\_SDSBUILD\APPDATA\LOCAL\TEMP\.NETFRAMEWORK,VERSION=V4.0.ASSEMBLYATTRIBUTES.CPP:
    T:\COMPONENTS\COLLECTORS\BUILDOUTPUT\X64\RELEASE\TMP\.NETFRAMEWORK,VERSION=V4.0.ASSEMBLYATTRIBUTES.OBJ
  C:\Users\_sdsbuild\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp will be compiled because it was not found in the tracking log.
  Outputs for C:\USERS\_SDSBUILD\APPDATA\LOCAL\TEMP\.NETFRAMEWORK,VERSION=V4.0.ASSEMBLYATTRIBUTES.CPP:
    T:\COMPONENTS\COLLECTORS\BUILDOUTPUT\X64\RELEASE\TMP\.NETFRAMEWORK,VERSION=V4.0.ASSEMBLYATTRIBUTES.OBJ
  Write Tracking Logs:
    T:\components\collectors\buildoutput\x64\Release\tmp\hp-scom-.10EE536C.tlog\CL.write.1.tlog

After this, there is another error.

Using "MIBPostProcessDependencyGraph" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll".
Task "MIBPostProcessDependencyGraph"
  To improve incremental build performance for managed components, please make sure that the 'VC++ Directories->Reference Directories' points to all the paths which contain the referenced managed assemblies.
  Could not load file or assembly 'general.Interop, Version=1.30.21.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
  To improve incremental build performance for managed components, please make sure that the 'VC++ Directories->Reference Directories' points to all the paths which contain the referenced managed assemblies.
  Could not load file or assembly 'Google.ProtocolBuffersLite.Serialization, Version=2.4.1.521, Culture=neutral, PublicKeyToken=55f7125234beb589' or one of its dependencies. The system cannot find the file specified.
  To improve incremental build performance for managed components, please make sure that the 'VC++ Directories->Reference Directories' points to all the paths which contain the referenced managed assemblies.
  Could not load file or assembly 'Collector2007, Version=3.10.18.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Done executing task "MIBPostProcessDependencyGraph".
Done building target "ManagedIncrementalBuildPostProcessDependencyGraph" in project

Not much information in the internet for this post build task MIBPostProcessDependencyGraph.

Could anyone please shed some light on this task and try to make me understand what this error is all about ?

Note: the compilation is done and the libraries are generated but this post build task failure causes some errors. SO wanted to understand and solve this.

Is ManagedIncrementalBuildPostProcessDependencyGraph not able to get the referenced libs while the compilation and pre compilation tasks were able to get those ?

Thanks in advance.

1 Answers1

0

MIBPostProcessDependencyGraph post build task fails in msbuild

When you open the file Microsoft.Metagen.targets under the folder C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140:

  <Target Name="ManagedIncrementalBuildPostProcessDependencyGraph"
          Condition="'@(ClCompile)' != '' and '$(EnableManagedIncrementalBuild)' == 'True'"
          DependsOnTargets="GetReferenceAssemblyPaths"
      AfterTargets="$(ManagedIncrementalBuildProcessDependencyGraphAfterTarget)"
    >
    <PropertyGroup>
      <MIBProcessDependencyGraphExcludedFolders Condition="'$(MIBProcessDependencyGraphExcludedFolders)' == ''">$(ExcludePath);$(FrameworkDir);$(VSInstallDir);$(_FullFrameworkReferenceAssemblyPaths)</MIBProcessDependencyGraphExcludedFolders>
      <MIBSearchPaths>$(ReferencePath);@(ClCompile->'%(AdditionalUsingDirectories)'->Distinct())</MIBSearchPaths>
    </PropertyGroup>

    <MIBPostProcessDependencyGraph
        Sources                            ="@(ClCompile)"
        SearchPath                         ="$(MIBSearchPaths)"
        ExcludedInputPaths                 ="$(MIBProcessDependencyGraphExcludedFolders)"
        IntDir                             ="$([System.IO.Path]::GetFullPath($(TLogLocation)))"

        ContinueOnError                    ="true"

        TLogReadFiles                      ="@(CLTLogReadFiles)"
        TLogWriteFiles                     ="@(CLTLogWriteFiles)"
      />
  </Target>

It used to add the manage dll path to the MIB searching path. To resolve this issue, you can try to do as the the error messages said:

To improve incremental build performance for managed components, please make sure that the 'VC++ Directories->Reference Directories' points to all the paths which contain the referenced managed assemblies.

You can check this thread for some details.

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135