Skip to content
Denis Kuzmin [ GitHub/3F ] edited this page May 9, 2020 · 1 revision

Post-processing

Provides options for more diverse integration between your projects and our tool.

Continues direction of the Pre-processing.

Predefined features

Modified modules and files for dependent projects

Original issue.

  • Choose what data you want to have in output directories of projects that depend on the projects where DllExport is processed.

  • Chose ++ to add sequential referencing support through other projects, i.e.:

ProjectC -> ProjectA + ProjectB
ProjectB -> ProjectA
+
ProjectC -> ProjectB -> ProjectA

Manual configuring (msbuild)

  1. Define DllExportProcEnv property:

Format: $(SolutionPath);$(MSBuildThisFileFullPath);...populated property names...;....

For example:

<PropertyGroup>
  <DllExportProcEnv>
    $(SolutionPath);$(MSBuildThisFileFullPath);
    TargetDir;
    AssemblyName;
    TargetPath;
    ...
  </DllExportProcEnv>
</PropertyGroup>
  1. Add callable target, named as DllExportPostProc:
<Target Name="DllExportPostProc">

    <!-- Now you can access the following properties and items:
    
    $(DllExport)     - version
    $(DllExportSln)  - full path to .sln which controls current project
    $(DllExportPrj)  - full path to current project where processed .NET DllExport
    
    @(DllExportDirX64)    - $(TargetDir)x64\*.*
    @(DllExportDirX86)    - $(TargetDir)x86\*.*
    @(DllExportDirBefore) - $(TargetDir)Before\*.*
    @(DllExportDirAfter)  - $(TargetDir)After\*.*
    
    @(DllExportDependents + populated property name) 
       - each populated properties from DllExportProcEnv, 
          e.g. DllExportDependentsTargetDir
       
    @(DllExportDependencies + populated property name) 
      - each populated properties from DllExportProcEnv, 
          e.g. DllExportDependenciesTargetDir

    @(DllExportSeqDependents + populated property name) 
       - each populated properties from DllExportProcEnv, 
          e.g. DllExportSeqDependentsTargetDir
      
    -->

</Target>
  1. Extend this if you need, for example:
<Target Name="DllExportPostProc">
  <!-- ... -->
</Target>

<Target AfterTargets="DllExportPostProc" Name="ExtForPostProc"
        Outputs="%(DllExportDependentsTargetDir.Identity)">

    <Copy SourceFiles="@(DllExportDirX64)" 
          DestinationFolder="%(DllExportDependentsTargetDir.Identity)x64\" />

</Target>