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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:06:44+00:00 2026-05-24T21:06:44+00:00

I have a solution with several C++ projects. For some of the projects I

  • 0

I have a solution with several C++ projects. For some of the projects I need some custom file copy, e.g. to copy some configuration files to the output directory or to copy the output files of one project to a specific folder after build.

In some cases I don’t want or cannot add these files to the projects directly through the Visual Studio IDE. I created simple .targets files which I can reuse and add to the projects which need the file copying.

Here is a simple example .targets file for copying configuration files:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <PropertyGroup>
 <BuildDependsOn>
  $(BuildDependsOn);
  CopyCustom
 </BuildDependsOn>
 </PropertyGroup>
 <ItemGroup>
 <CustomFiles Include="$(ProjectDir)Config\**\*.xml" />
 </ItemGroup>
 <PropertyGroup>
 <DestCustFolder>$(OutDir)Config\</DestCustFolder>
 </PropertyGroup> 
 <Target Name="CopyCustom"
 Inputs="@(CustomFiles )"
 Outputs="@(CustomFiles ->'$(DestCustFolder)%(RecursiveDir)%(FileName)%(Extension)')"> 
 <Message Text="Copy custom files..." />
 <Copy SourceFiles="@(CustomFiles )" DestinationFiles="@(CustomFiles->'$(DestCustFolder)%(RecursiveDir)%(FileName)%(Extension)')" SkipUnchangedFiles="true" />
 </Target>
</Project>

Through the “Build Customization” dialog in Visual Studio I add it to the project so it will be included like this at the end of the project file:

 <ImportGroup Label="ExtensionTargets">
<Import Project="..\Targets\CopyCustom.targets" />/
 </ImportGroup>

This should enable incremental build of my custom target. If I just edit one of my custom files (and none of the C++ files) and build it form the console with

msbuild foo1.vcxproj

it will actually detect the changes and does an incremental build for my custom target. If no changes are made the target is skipped.

If I do however build inside Visual Studio it will not detect changes to the custom files and only and gives me the message that the project is up to data:

========== Build: 0 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========

I would have to additionally change one of the C++ files to make it check all targets again and to the incremental build.

I was expecting that Visual Studio just executes MSBuild which will then do the up-to-date check on the projects, so it should be the same result as running MSBuild from the console. I was trying to get more information by setting the verbosity level to diagnostic but I just get the same line. It seems to me that MSBuild is not even executed for the project but Visual Studio itself determines that the project is up-to-date.

So I was wondering how Visual Studio actually determines when it should execute MSBuild for a project.

I asked basically the same question before on the MSDN forum but couldn’t get a clear answer.

  • 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-24T21:06:45+00:00Added an answer on May 24, 2026 at 9:06 pm

    See this suggestion on Microsoft Connect.

    Basically you need to set DisableFastUpToDateCheck property to true to disable the fast-up-to-date check.

    Just add to your vcxproj or your targets file:

    <PropertyGroup>  
      <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
    </PropertyGroup>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a solution with several projects. One of them is a setup project.
In a .net application involving several projects in one solution, I have a project
I have several projects and a website in a large asp.net solution. In some
I have a solution with several projects, where the startup project has a post-build
I have several web application projects in one solution. When I start debugging one
I need some help regarding Visual Studio solution and project organization. I have a
I have one solution with several projects. Say ProjectA is the one that will
We have a large solution here, with several dozen projects. The only build configuration
I have a solution containing several projects that have migrated from VS 2003, 2005,
I have a Solution with several projects in it, including two asp.net mvc projects

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.