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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:56:38+00:00 2026-06-05T02:56:38+00:00

I have a PRISM app in a single TFS solution (shell, comon library, two

  • 0

I have a PRISM app in a single TFS solution (shell, comon library, two modules and several test projets. for simplcity I chose a DirectoryModuleCatalog and in order to run apps locally after a build added a postbuild step to teh module projects buils that copied the build dll to a modules subfolder of the GUI apps output path.

This works just fine on a local client build, but when the same postbuild event is triggered from the TFS build agent it fails. On inspection this is becuase the $(OutDir) macro which is a relative path locally is an absolute path in teh TFS build agent MSBuild logs!

to quote MSDN

$(OutDir) 

Path to the output file directory, relative to the project directory. 
This resolves to the value for the Output Directory property. 
It includes the trailing backslash '\'.

Locally this resolves to “bin\Debug\”
on the build agent it resolves to “C:\Builds\5\XXXX\Gui.DEV_XXXX7_Iteration0.CI\Binaries\”

Given this orginal local post build definition;

mkdir "$(SolutionDir)Gui\$(OutDir)Modules\"
copy "$(TargetPath)" "$(SolutionDir)Gui\$(OutDir)Modules\"

You can see why it fails on the build agent like this:

mkdir "C:\Builds\4\XXXX\Gui.DEV_Cortex7_Iteration0.CI\Sources\Gui\C:\Builds\4    \XXXX\Gui.DEV_XXXX7_Iteration0.CI\Binaries\Modules\"
copy "C:\Builds\4\XXXX\Gui.DEV_XXXX7_Iteration0.CI\Binaries\Apdcomms.Cortex.Gui.Example2.Module.dll" 
    "C:\Builds\4\XXXX\Gui.DEV_XXXX7_Iteration0.CI\Sources\Gui\C:\Builds\4\XXXX\Gui.DEV_XXXX7_Iteration0.CI\Binaries\Modules\"
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
      0 file(s) copied.

So looing at the values of the macros it would seem I need a different set of commands in postbuild when building under TFS build agents to that in local mode, that is pretty sucky.

SO to the qestion: How can I move the binary output of one project in a solution to a sub-folder of another project in that same solution in a way that works on a locla client build AND a TFS team build?

  • 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-06-05T02:56:39+00:00Added an answer on June 5, 2026 at 2:56 am

    I personally don’t like relying on post build scripts when building from TFS. It would be much better to customize your build template. While the postbuild script is certainly easier, the build template will manage your environment (in my opinion) better. I’m linking to a Microsoft article to give you a bit more info on how to accomplish this. I’m also pasting the content so that StackOverflow can stay self contained.

    http://msdn.microsoft.com/en-us/library/ff977206.aspx

    The default build process (as defined in DefaultTemplate.xaml), drops the binaries that it compiles from all your code projects into a single directory. However, in some cases, you want to organize the binaries into a more granular and organized folder structure.

    You can use techniques in this topic to create a custom build process that drops your binaries into a directory structure that you design. You can also customize build processes in different ways by using the same principles. This topic explains the following techniques:

    Customize the Windows Workflow segment of the build process. You should make changes in this segment to customize most aspects of your build process except for compilation and handling of binaries. Specifically, this topic describes how to perform the following tasks:

    Create a custom build process by modifying a copy of the Default Template (DefaultTemplate.xaml).

    Declare and use arguments to pass data into the workflow.

    Declare and use variables to collect and pass data throughout the workflow.

    Modify how the workflow uses the MSBuild activity to call MSBuild.

    Download a file to the build server and use the ConvertWorkspaceItem activity to make that file available to the build process.

    Customize the MSBuild segment of the build process. By making changes in this segment, you can more effectively customize how binaries are compiled and handled. Specifically, this topic describes how to perform the following tasks:

    Pass arguments to MSBuild and then use them in your code projects to change how your compiled binaries are handled.

    Set up a centralized common code library of your own MSBuild elements, such as property groups or targets. By setting up this type of library, you enable your team to easily reuse and modify key pieces of your build process logic.

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

Sidebar

Related Questions

I have a PRISM desktop app which loads modules from a directory with the
I have a prism app where I've added a third party WPF control library
I am building a Prism app with several modules, one of which ( MyModule
So I have two separate views in a WPF Prism app. How can I
suppose, we have a Mozilla Prism like XULRunner app. There is a XUL window
I have a prism app using RIA services, and my authentication service is in
Background: I work in a suite of ASP.NET applications that have several different modules.
I'm developing an app using SL Prism and MEF using MVVM. I have my
I have a silverlight app using Prism practices; the current code does a search
I am creating a Prism 2.1 app in which I have implemented logging, using

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.