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

  • Home
  • SEARCH
  • 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 8834595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:03:25+00:00 2026-06-14T09:03:25+00:00

I have customised an MSBuild project so that the default target is a new

  • 0

I have customised an MSBuild project so that the default target is a new target named similarly to ‘BuildWithExternalReference’. This new target calls two other targets; the first is a custom target called something like ‘BuildExternalReference’ which builds a DLL using an external tool. The DLL that is built is a reference for the main project, which is built using the normal ‘Build’ target. I have setup the Inputs and Outputs attributes for the ‘BuildExternalReference’ target so the Inputs reference the source files and the outputs reference the resulting DLL.

In both Visual Studio 2012 and Visual Studio 2010 the build works correctly the first time it is invoked. However, on subsequent builds if I change the external source files (referenced by the ‘BuildExternalReference’ target Inputs attribute) then Visual Studio 2012 simply reports ‘Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped’. Visual Studio 2010 continues to work perfectly. In addition, building from the command line with MSBuild.exe works perfectly.

I’m aware that the build system in Visual Studio 2012 has changed, but I can’t find information about changes to the way incremental builds are performed.

Has anything changed in Visual Studio 2012 to cause incremental builds to change?

Here’s a cut down version of the csproj file I’m using:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="BuildWithExternalTool" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ExternalSourceFiles Include="..\ExternalSourceFiles\\*\*.cs" />
    <ExternalDll Include="..\ExternalSource\External.dll" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Target Name="BuildExternalTool" Inputs="@(ExternalSourceFiles);" Outputs="@(ExternalDll)">
    <Exec Command="C:\External\Path\To\Tool.exe" />
  </Target>
  <Target Name="BuildWithExternalTool">
    <CallTarget Targets="BuildExternalTool" />
    <CallTarget Targets="Build" />
  </Target>
</Project>

Update 1st of November 2012

Here’s a complete self contained example which reproduces the issue:

https://skydrive.live.com/redir?resid=EA1DD6ACA92F9EFF!155&authkey=!ANhuqF_rrCgxpLE

This is a solution with one project. The MSBuildIssueExample\MSBuildIssueExample.csproj file has been customised so there is a custom default target. This default target calls a custom target (called ‘ExternalTool’) and then the default Build target.

The custom ExternalTool target writes out some messages to make sure it’s working, and also copies the contents of the MSBuildIssueExample\ExternalTool\Input.txt file over the MSBuildIssueExample\ExternalTool\Output.txt file.

The Input.txt file is a input of the ExternalTool target, and Output.txt is an output.

To recreate the issue follow these steps:

1) Open the solution in the designated version of Visual Studio

2) Build the solution once to make sure the outputs are up to date with respect to the inputs

3) Modify MSBuildIssueExample\ExternalTool\Input.txt so its content does not match Output.txt

4) Build again

When you go through this process in Visual Studio 2010 the ExternalTool target will be invoked again, and the Input.txt file will be copied over Output.txt.

When you go through this process in Visual Studio 2012 the ExternalTool target will not be invoked, even though the inputs are newer than the outputs, and as a result the contents of Input.txt will not be written to Output.txt.

However, if you do Rebuild (rather than just Build) then both versions of Visual Studio work as expected.

  • 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-14T09:03:27+00:00Added an answer on June 14, 2026 at 9:03 am

    This feedback from Microsoft answers the question:

    This is due to a change in VS 2012 where C#/VB projects now do a "fast up-to-date check" that allows them to skip the build, rather than forcing the build all the time. One downside, however, is that fast up-to-date check does not take into account custom targets, which is why your incremental change was not detected. If you wish to disable the "fast up-to-date check" please set "DISABLEFASTUPTODATECHECK" to true either as an MSBuild property in the project file or as an environment variable in the environment you launch VS from.

    So basically this is a breaking change in Visual Studio 2012 that unfortunately does not seem to be documented very well.

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

Sidebar

Related Questions

i have a customised wordpress post that looks like this when view source. How
I'm developing a child theme for the Buddypress default theme. I have customised the
I have an mainUIView within which there is a customised UIImageView (named myImageView). In
Simple question, I have some customised java that allows to have 32 bit HW
I have a PHP script that publishes customised JavaScript based on the parameter, with
I have written a class that extends JPanel. Is it possible to use this
I have a Swing application that is heavy customised with a lot of custom
We have a website application that is deployed and customised for multiple customers, across
In my Project, I have a customised @interface GraphView: UIView . Hence GraphView is
I have an application that looks for a specific FTDI serial port with customised

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.