Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1049817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:40:33+00:00 2026-05-16T16:40:33+00:00

I have a WiX (Windows installer XML) v3, project which contains references to other

  • 0

I have a WiX (Windows installer XML) v3, project which contains references to other projects in my solution. I am using the copy task inside the BeforeBuild event of the WiX project to collect some of the output of the references projects for later use my Heat.

When I build the WiX project (not the solution) inside Visual Studio, each of the referenced projects is build before my WiX project and once they are built, the BeforeBuild event on my WiX project fires and then the WiX project itself is built. This is the behaviour I expect – I am able to access files from the bin directories of the references projects in the WiX BeforeBuild and use them as I please before the WiX project executes Candle.

The problem I am having is when I build the WiX file via MSBuild I am finding that the BeforeBuild event fires straight away BEFORE any of the referenced projects. This difference in behaviour means that I cannot make use of the outputs of the referenced projects when building from the command line.

Why is BeforeBuild executing at a different point in time when run via MSBuild on the command line to inside Visual Studio?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:40:33+00:00Added an answer on May 16, 2026 at 4:40 pm

    If you are building inside Visual Studio, the solution dependencies (which can be explicit or based on the project references) are used to determine which projects need to be built and a separate build is kicked off for each of them. This is necessary since solutions can also contain projects that are not built using MSBuild and other projects have explicit dependencies set in the solution for them. The side effect is that each project is treated as a stand-alone build, thus ensuring the right BeforeBuild order for you..

    If you are building from the command line using MSBuild, the dependency projects are resolved (and built if necessary) during the ResolveReferences target. The BeforeBuild target and PreBuild event (executed from the PreBuildEvent target) are both performed before the ResolveReferences target. Thus the dependent project BeforeBuild target ends up executing before the build for the dependency project is kicked off.

    Note that from a point of view of a single project, BeforeBuild target does make sense to be executed before resolving dependencies, as the dependency resolution might itself depend on the BeforeBuild target output. For example, BeforeBuild might execute a custom script to get the latest copy of any dependency projects from the SCM.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using WiX (Windows Installer XML) I have created an MSI installer which installs Word
I have a project where I create WiX (Windows Installer for XML) files, when
I have a Windows Installer XML (WiX 3.5) project and five localization files for
I have created an installation package using Wix which installs a Windows service on
I am creating an installer for my program using WiX (Windows Installer XML). I
Why should one go for Windows Installer XML (WiX) when we have in built
I'm creating a Wix installer for a windows service which needs to have provided,
I've got a WiX installer project which uses MSBuild to generate the MSI file.
I have a simple WiX (3.5.2030.0) installer on Windows 7 (Windows Installer 5.0.7600.16385 according
I have a wix installer that will install an XML file and then modify

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.