title: Force Visual Studio to rebuild on Start Debugging
body: <p>This is very different compared to <a href="https://stackoverflow.com/questions/12529408/how-to-tell-visual-studio-to-rebuild-every-time-i-make-a-change">How to tell visual studio to rebuild every time I make a change? </a></p>
  
  <p>The issue is that I have modified a csproj that is not referenced a project (because it's run-time dependency).</p>
  
  <p>So for example, in my csproj file I have:</p>
  
  <pre><code>&lt;Import Project=".\UnreferencedProjects-Developer.targets" /&gt;
  </code></pre>
  
  <p>In my <code>.targets</code> file, I have:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;Target Name="BuildDependencyForDevelopers" AfterTargets="Build"&gt;
      &lt;Message Text="========================================" /&gt;
      &lt;Message Text="Developer Building Unreferenced Projects" /&gt;
      &lt;Message Text="========================================" /&gt;
      &lt;!--MSBuild Projects="$(ProjectToBuild)"--&gt;
      &lt;MSBuild Projects="../OtherProject/OtherProject.csproj"&gt;
        &lt;Output ItemName="ProjectOutputs" TaskParameter="TargetOutputs"/&gt;
      &lt;/MSBuild&gt;
      &lt;Message Text="@(ProjectOutputs)"/&gt;
      &lt;Message Text="=======================================" /&gt;
      &lt;Message Text="Developer Copying Unreferenced Projects" /&gt;
      &lt;Message Text="=======================================" /&gt;
      &lt;Copy SourceFiles="$(ProjectDir)\..\OtherProject\bin\$(Configuration)\OtherProject.dll" DestinationFolder="$(OutDir)" ContinueOnError="true"/&gt;
      &lt;Copy SourceFiles="$(ProjectDir)\..\OtherProject\bin\$(Configuration)\OtherProject.pdb" DestinationFolder="$(OutDir)" ContinueOnError="true"/&gt;
      &lt;Message Text="=============================================" /&gt;
      &lt;Message Text="Developer Finished with Unreferenced Projects" /&gt;
      &lt;Message Text="=============================================" /&gt;
    &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>The issue is that the <code>.targets.</code> file seems to only execute on a manual build/rebuild, and not on a Start Debugging.</p>
  
  <p>All Configurations are set to Build.  Options -> Project and Solutions -> Build and Run -> On Run, when projects are out of date: Always build.</p>
  
  <p>I think the issue is that because the project is unreferenced, when I <em>Start Debugging</em> there are no out of date projects so it launches without a build/rebuild.  How do I force it to literally <em>always (re)build</em>.</p>