Skip to content

Skip packing custom actions in design-time builds - #738

Open
Jonathan727 wants to merge 2 commits into
wixtoolset:mainfrom
Jonathan727:9260-design-time-build-skip-packcustomaction-v1
Open

Jonathan727 wants to merge 2 commits into
wixtoolset:mainfrom
Jonathan727:9260-design-time-build-skip-packcustomaction-v1

Conversation

@Jonathan727

Copy link
Copy Markdown

Fixes wixtoolset/issues#9260

Problem

IDE design-time builds, such as Visual Studio or ReSharper loading a project, run Compile. That runs PackCustomAction from AfterCompile. When the custom action package is out of date, for example after a Content file is edited, the design-time build runs WixToolset.Dtf.MakeSfxCA.exe. This slows down normal development and rewrites the .CA.dll in obj\ while a real build may be using it.

Fix

PackCustomAction now honors SkipCompilerExecution, the same property that makes the compiler skip its work in a design-time build.

Testing

The first commit adds CanSkipPackingCustomActionInDesignTimeBuildAfterBuild, and the second commit makes it pass. It runs under the .NET SDK, MSBuild and MSBuild64. The test:

  • does a real build, then makes the package out of date
  • runs a design-time build with the package and its response file locked, as a concurrent real build would
  • asserts that MakeSfxCA did not run and that the outputs are untouched
  • asserts that the next real build still repacks

Feedback and Related Issue

Let me know what you think about these changes. If you want me to squash them into a single commit, I can. Also please consider assigning wixtoolset/issues#9359 to me.

IDE design-time builds (such as Visual Studio or ReSharper loading a project)
run Compile, which runs PackCustomAction from AfterCompile. When the custom
action package is out of date, for example after a Content file is edited,
the design-time build runs MakeSfxCA and rewrites the .CA.dll in obj\ even
though SkipCompilerExecution=true, which collides with a concurrent real
build.

This test demonstrates the existing behavior and fails until it is fixed.
Like the compiler, PackCustomAction now honors SkipCompilerExecution so IDE
design-time builds (such as Visual Studio or ReSharper loading a project) no
longer run MakeSfxCA. Previously, when the custom action package was out of
date, those builds rewrote the .CA.dll in obj\ at the same time as the real
build.

Fixes 9260
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Jonathan727

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not run MakeSfxCA during design-time builds

1 participant