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 6784143
In Process

The Archive Base Latest Questions

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

I’ve been looking for some considerable time for an answer to my question regarding

  • 0

I’ve been looking for some considerable time for an answer to my question regarding using Team Build in conjunction with the WiX3.5 installer (which is fully installed on the Team Build Agent). In a nutshell my problem is similar to many of the forum questions but with a slight twist. In order to reference a component in our Wix Fragments, we use the pattern:

<Component Id="SomeAssembly.dll" Guid="80C99053-D78C-449C-9645-9031E50FD95F">
    <File Id="SomeAssembly.dll" Source="$(var.MyNamespace.TargetDir)\SomeAssembly.dll" KeyPath="yes"/>
  </Component>

Where the $(var.MyNamespace.TargetDir) variable is automatically supplied by the WiX build engine when you use a project reference within your WiX project. I have noted that it is only possible to use Project references within my solution which is where my problem begins.

In my team build definition I have a number of solutions that are being built as part of the build process (around about 30 so far) as these components can be used to make up a number of other products within the same source tree. When team build runs however, the relative paths to the component files changes to that of a flat (ish) file structure which in the above example is fine, however for assemblies that are referenced in a purely relative path fashion fail as the build process has moved the project output.

What is the best way to overcome this problem? Should I create one gigantic solution that contains every one of my projects in it and use project references throughout? Or is there a neater less work intensive way that I can resolve this?

Thank you for your time!

  • 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-26T16:57:16+00:00Added an answer on May 26, 2026 at 4:57 pm

    In the end I resorted to solving this problem by using a single “Path Variables” file which I subsequently included in all of my *.wxs files using the pre-processor directive.

    For projects that weren’t directly referenced by a project reference within my WiX project I copied the same naming convention for the variables e.g.

    Namespace.ProjectName.TargetDir

    And used the DevEnvDir variable that is defined in the Visual Studio build within a set of pre-processor if and defines. The ugliness comes from the DevEnvDir variable when it hasn’t been officially set by Team Build, but it gets set with the value “Undefined if not building from within Visual Studio” which I think is extremely unpleasant. This makes it hard to simply use an approach.

    My approach for the PathVariables.wxi file:

    <!-- Safety check for the variable -->
    <?ifndef DevEnvDir ?>
        <?define IsDesktopBuild = false ?>
    <?else?>
       <?if $(var.DevEnvDir) = "*Undefined if not building from within Visual Studio*" ?>
         <?define IsDesktopBuild = false ?>
       <?else?>
          <?define IsDesktopBuild = true ?>
       <?endif?>
    <?endif?>
    

    After which you need to set-up any of the additional as follows:

    <?if $(var.IsDesktopBuild)=false ?>
       <!--Build is TFS2010, default is to the OutDir variable -->
      <?define Namespace.Project.TargetDir = "$(var.OutDir)"?>
    <?else?>
      <!-- Build is Local Build -->
      <?define Namespace.Project.TargetDir = C:\LocalFolderPath\Bin\$(var.Configuration)"?>
    <?endif?>
    

    Then within any of your wxs files, ensuring you’ve included the:

    <?include [PathAsAppropriate]\PathVariables.wxi ?>
    

    You can then universally refer to the file path in the same fashion regardless of local build versus Team Build.

    <Component Id="Namespace.Project.dll" Guid="*">
        <File Id="Namespace.Project.Dll" Source="$(var.Namespace.Project.TargetDir)\Project.dll"/>
    </Component>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.