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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:04:07+00:00 2026-05-24T10:04:07+00:00

Note: Visual Studio 2010 SP1 / MSBuild 4.0 I’m going crazy over this bug,

  • 0

Note: Visual Studio 2010 SP1 / MSBuild 4.0

I’m going crazy over this bug, I cannot understand why Visual Studio is behaving this way. I’m writing a custom .targets file for my projects in a particular solution. I’ve edited the .csproj file to have:

<Include Project="..\MyTargets.targets" />

After Microsoft.CSharp.targets near the bottom of the file. The idea is that this targets file will inject actions to be performed by modifying the _____DependsOn properties just like how PostSharp integrates itself.

After scratching my head at how my targets would not run I decided to run it in the command line with MSBuild and see the nicely formatted color output.

In the command line, my targets run. From visual studio (even using clean/rebuild), my targets do not run.

I’ve hooked BuildDependsOn to run my targets like this:

<PropertyGroup>
  <BuildDependsOn>
    MyTargetGoesHere;
    $(BuildDependsOn)
  </BuildDependsOn>
</PropertyGroup>

My first thought is that i’ve got the wrong file. I verified the file, it’s the right one. Then I checked to see if it was stale. Let visual studio make some changes, saved, ran. Visual studio’s new changes took effect, still didn’t run my targets.

So here I’m getting desperate. I put a BLARING SYNTAX ERROR in my targets file. MSBuild explodes, Visual Studio compiles the project successfully.

  • What am I doing wrong?
  • Does Visual Studio not use the MSBuild file?
  • Does it call some super secret target instead of “Build” from Microsoft.Common.targets?
  • Why would msbuild behave one way and studio another, I thought they were designed to work together…
  • 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-24T10:04:07+00:00Added an answer on May 24, 2026 at 10:04 am

    To summarize the comments above, changes to imported project files do not trigger a reload, nor do changes to the importing project cause a reload of the imports. A solution file reload is needed to capture changes made in an import.

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

Sidebar

Related Questions

Setup: I am using MVC 3, EF 4.1, Visual Studio 2010 SP1 with Power
note: First of all i am using visual studio 2010. Usually i need dll
Visual Studio 2010 / ASP.NET project / ASP.NET Development server I can run and
I am using Visual Studio 2010 express edition and the IDE is good for
I have a Visual Studio 2010 solution with 8 projects. It also has a
I have Visual Web Developer Express 2008 as well as Visual Studio 2010 Professional
Note : No MFC No ATL Using Visual C++ While attempting a connection between
Note: This was posted when I was starting out C#. With 2014 knowledge, I
Note: Originally this question was asked for PostgreSQL, however, the answer applies to almost
Note : The code in this question is part of deSleeper if you want

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.