From 00a024e8595784e485115543f6045a0c5ea11ebc Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 25 Oct 2022 11:29:34 -0700 Subject: Pack CA assembly only after it exists Trying to pack the CA assembly before it is built reports erroneous or redundant error messages so don't do that. Fixes 6968 --- .../WixToolset.Dtf.CustomAction.targets | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets b/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets index 9d63f24c..e83272a2 100644 --- a/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets +++ b/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets @@ -23,7 +23,10 @@ PackCustomAction Creates an MSI managed custom action package that includes the custom action assembly, - local assembly dependencies, and project content files. + local assembly dependencies, and project content files. This target is skipped until the + custom action assembly has been built. This prevents the target from running (and failing) + during project restore and other scenarios where the project is executed but the assembly + build is skipped. [IN] @(IntermediateAssembly) - Managed custom action assembly. @@ -36,7 +39,8 @@ --> + Outputs="$(IntermediateOutputPath)$(TargetCAFileName)" + Condition=" Exists('@(IntermediateAssembly)') "> -- cgit v1.2.3-55-g6feb