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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:31:55+00:00 2026-05-10T19:31:55+00:00

I just finished setting up an out-of-place build system for our existing C++ code

  • 0

I just finished setting up an out-of-place build system for our existing C++ code using inherited property sheets, a feature that seems to be specific to the Visual C++ product. Building out-of-place requires that many of the project settings be changed, and the inherited property sheets allowed me to change all the necessary settings just by attaching a property sheet to the project. I am migrating our team from C++/MFC for UI to C# and WPF, but I need to provide the same out-of-place build functionality, hopefully with the same convenience. I cannot seem to find a way to do this with C# projects – I first looked to see if I could reference an MsBuild targets file, but could not find a way to do this. I know I could just use MsBuild for the whole thing, but that seems more complicated than necessary. Is there a way I can define a macro for a directory and use it in the output path, for example?

  • 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. 2026-05-10T19:31:55+00:00Added an answer on May 10, 2026 at 7:31 pm

    I’m not quite sure what an ‘out-of-place’ build system is, but if you just need the ability to copy the compiled files (or other resources) to other directories you can do so by tying into the MSBuild build targets.

    In our projects we move the compiled dlls into lib folders and put the files into the proper locations after a build is complete. To do this we’ve created a custom build .target file that creates the Target‘s, Property‘s, and ItemGroup‘s that we then use to populate our external output folder.

    Our custom targets file looks a bit like this:

    <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>     <PropertyGroup>         <ProjectName>TheProject</ProjectName>         <ProjectDepthPath>..\..\</ProjectDepthPath>         <ProjectsLibFolder>..\..\lib\</ProjectsLibFolder>          <LibFolder>$(ProjectsLibFolder)$(ProjectName)\$(Configuration)\</LibFolder>     </PropertyGroup>      <Target Name='DeleteLibFiles'>         <Delete Files='@(LibFiles-> '$(ProjectDepthPath)$(LibFolder)%(filename)%(extension)')' TreatErrorsAsWarnings='true' />     </Target>     <Target Name='CopyLibFiles'>         <Copy SourceFiles='@(LibFiles)' DestinationFolder='$(ProjectDepthPath)$(LibFolder)' SkipUnchangedFiles='True' />     </Target>      <ItemGroup>         <LibFiles Include=' '>             <Visible>false</Visible>         </LibFiles>     </ItemGroup> </Project> 

    The .csproj file in Visual Studio then integrates with this custom target file:

    <?xml version='1.0' encoding='utf-8'?> <Project ToolsVersion='3.5' ... >     ...     <Import Project='..\..\..\..\build\OurBuildTargets.targets' />       <ItemGroup>         <LibFiles Include='$(OutputPath)$(AssemblyName).dll'>           <Visible>false</Visible>         </LibFiles>       </ItemGroup>     <Target Name='BeforeClean' DependsOnTargets='DeleteLibFiles' />     <Target Name='AfterBuild' DependsOnTargets='CopyLibFiles' /> </Project> 

    In a nutshell, this build script first tells MSBuild to load our custom build script, then adds the compiled file to the LibFiles ItemGroup, and lastly ties our custom build targets, DeleteLibFiles and CopyLibFiles, into the build process. We set this up for each project in our solution so only the files that are updated get deleted/copied and each project is responsible for it’s own files (dlls, images, etc).

    I hope this helps. I apologize if I misunderstood what you mean by out-of-place build system and this is completely useless to you!

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

Sidebar

Related Questions

I've just finished setting up a project using MVC 3, Fluent nHibernate, AutoMapper, and
So I am just starting out developing PHP web applications and have finished setting
I just finished setting up my Eclipse with the Android plug-in. (i.e https://dl-ssl.google.com/android/eclipse/ )
I just finished setting up a local site for development with apache2 on OSX,
I've just finished setting up the foundations for performing schema upgrades on GAE's datastore
I am setting up a rails app and I just finished making some unit
I just finished setting up a Rackspace Cloud Server to host a website I'm
I've just finished setting up my server with phusion passenger and nginx, complete with
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case
Just finished up my first mvc4 app. Everything is working great until I deploy

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.