<Target
Name="DnneGenerateNativeExports"
Condition="('$(DesignTimeBuild)' != 'true' OR '$(BuildingProject)' == 'true') AND '$(DnneBuildExports)' == 'true'"
Inputs="@(IntermediateAssembly)"
Outputs="@(DnneGeneratedSourceFile)"
AfterTargets="CoreCompile">
<Message Text="Generating source for @(IntermediateAssembly) into @(DnneGeneratedSourceFile)" Importance="$(DnneMSBuildLogging)" />
<!-- Ensure the output directory exists -->
<MakeDir Directories="$(DnneGeneratedOutputPath)" />
<PropertyGroup>
<DocFlag Condition="Exists($(DocumentationFile))">-d "$(DocumentationFile)"</DocFlag>
</PropertyGroup>
<Exec Command="$(DnneGenExe) @(IntermediateAssembly) $(DocFlag) -o @(DnneGeneratedSourceFile)" />
</Target>
The Exec task fails and the output stating why it failed requires careful scrutiny of logs.
The build will fail because the output C file (dnne/*.g.c) will be absent.
c1 : fatal error C1083: Cannot open source file: X:\...\obj\...\dnne\ProjectName.g.c
Either it needs to 'allow' the file to be absent, and/or issue warnings or errors instead of simply stating the file is missing.
There are CustomErrorRegularExpression and CustomWarningRegularExpression which can be applied according to the Exec task docs. Verifying the existence of the output file could also be a good follow up.
The
Exec
task fails and the output stating why it failed requires careful scrutiny of logs.The build will fail because the output C file (
dnne/*.g.c
) will be absent.Either it needs to 'allow' the file to be absent, and/or issue warnings or errors instead of simply stating the file is missing.
There are
CustomErrorRegularExpression
andCustomWarningRegularExpression
which can be applied according to the Exec task docs. Verifying the existence of the output file could also be a good follow up.