title: FSharp project is compiled every time in VS2013
body: <p>I fixed a few issues that cause project rebuilds, mainly in C#/C++ projects (change copy always to copy if newer, remove references to missing files, etc). I did it by changing the MSBuild output to Diagnostic and analysing the output.</p>
  
  <p>But I failed to apply the same workarounds for very simple FSharp projects which are in the solution. Output does not show anything suspicious for me. The project itself is a one-file project.</p>
  
  <p>Minimal output:</p>
  
  <pre><code>1&gt;------ Build started: Project: FSharpProject, Configuration: Debug Any CPU ------
  1&gt;  "C:\Project\Source\.nuget\NuGet.exe" install "C:\Project\Source\FSharpProject\packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "C:\Project\Source\ "
  1&gt;  All packages listed in packages.config are already installed.
  1&gt;  FSharpProject -&gt; C:\Project\Source\FSharpProject\bin\Debug\FSharpProject.dll
  2&gt;------ Build started: Project: FSharpProject.Tests, Configuration: Debug Any CPU ------
  2&gt;  "C:\Project\Source\.nuget\NuGet.exe" install "C:\Project\Source\FSharpProject.Tests\packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "C:\Project\Source\ "
  2&gt;  All packages listed in packages.config are already installed.
  2&gt;  FSharpProject.Tests -&gt; C:\Project\Source\FSharpProject.Tests\bin\Debug\FSharpProject.Tests.dll
  ========== Build: 2 succeeded, 0 failed, 16 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Diagnostic output is HUGE, but it looks like it does not show rebuild reasons.</p>
  
  <p><em>Update:</em></p>
  
  <p>I've created a simple solution with two projects: C# and F#.</p>
  
  <p>While C# project is reported up-to-date, the build action is executed for the F# project all the time. Is it just normal behaviour for the F# projects?</p>
  
  <pre><code>1&gt;------ Build started: Project: FSharpProject, Configuration: Debug Any CPU ------
  1&gt;Target "_CheckForInvalidConfigurationAndPlatform" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (entry point):
  1&gt;Target "BeforeBuild" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Build" depends on it):
  1&gt;Target "BuildOnlySettings" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "GetFrameworkPaths" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.NetFramework.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareForBuild" depends on it):
  1&gt;Target "GetReferenceAssemblyPaths" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareForBuild" depends on it):
  1&gt;Target "PrepareForBuild" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "BeforeResolveReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveReferences" depends on it):
  1&gt;Target "AssignProjectConfiguration" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveReferences" depends on it):
  1&gt;Target "_SplitProjectReferencesByFileExistence" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveProjectReferences" depends on it):
  1&gt;Target "ResolveProjectReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveReferences" depends on it):
  1&gt;Target "GetInstalledSDKLocations" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveSDKReferences" depends on it):
  1&gt;Target "ResolveSDKReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveAssemblyReferences" depends on it):
  1&gt;Target "ExpandSDKReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveAssemblyReferences" depends on it):
  1&gt;Target "ResolveAssemblyReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveReferences" depends on it):
  1&gt;Target "AfterResolveReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveReferences" depends on it):
  1&gt;Target "ImplicitlyExpandDesignTimeFacades" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.NetFramework.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResolveReferences" depends on it):
  1&gt;Target "ResolveReferences" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "ValidationExtension" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WorkflowBuildExtensions.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "ExpressionBuildExtension" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WorkflowBuildExtensions.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "AfterMarkupCompilePass1" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "FileClassification" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "AssignTargetPaths" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResourceNames" depends on it):
  1&gt;Target "SplitResourcesByCulture" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResourceNames" depends on it):
  1&gt;Target "CreateCustomManifestResourceNames" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResourceNames" depends on it):
  1&gt;Target "PrepareResourceNames" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "BeforeResGen" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResGen" depends on it):
  1&gt;Target "CoreResGen" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResGen" depends on it):
  1&gt;Target "AfterResGen" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "ResGen" depends on it):
  1&gt;Target "ResGen" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "PrepareRdlFiles" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\ReportingServices\Microsoft.ReportingServices.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CompileRdlFiles" depends on it):
  1&gt;Target "CompileRdlFiles" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\ReportingServices\Microsoft.ReportingServices.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareResources" depends on it):
  1&gt;Target "PrepareResources" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "_SetEmbeddedWin32ManifestProperties" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "SetWin32ManifestProperties" depends on it):
  1&gt;Target "SetWin32ManifestProperties" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "_GenerateCompileInputs" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "GenerateTargetFrameworkMonikerAttribute" in file "C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "BeforeCompile" depends on it):
  1&gt;  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
  1&gt;Target "BeforeCompile" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "DesignTimeXamlMarkupCompilation" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreCompile" depends on it):
  1&gt;Target "DesignTimeMarkupCompilation" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreCompile" depends on it):
  1&gt;Target "CoreCompile" in file "C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;  Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
  1&gt;Target "AfterCompile" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "SetBuildInfoDefaults" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\BuildInfo\Microsoft.VisualStudio.ReleaseManagement.BuildInfo.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "DeleteBuildInfoFile" depends on it):
  1&gt;Target "DeleteBuildInfoFile" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\BuildInfo\Microsoft.VisualStudio.ReleaseManagement.BuildInfo.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "DeleteBuildInfoResource" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\BuildInfo\Microsoft.VisualStudio.ReleaseManagement.BuildInfo.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "AfterCompileWinFX" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "_AfterCompileWinFXInternal" depends on it):
  1&gt;Target "_AfterCompileWinFXInternal" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "CodeContractReferenceAssembly" in file "C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v12.0\Microsoft.CodeContracts.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Compile" depends on it):
  1&gt;Target "Compile" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "_GenerateSatelliteAssemblyInputs" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CreateSatelliteAssemblies" depends on it):
  1&gt;Target "CreateSatelliteAssemblies" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "GetTargetPath" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "_CopyFilesMarkedCopyLocal" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CopyFilesToOutputDirectory" depends on it):
  1&gt;Target "GetCopyToOutputDirectoryXamlAppDefs" in file "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "GetCopyToOutputDirectoryItems" depends on it):
  1&gt;Target "GetCopyToOutputDirectoryItems" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "_CopySourceItemsToOutputDirectory" depends on it):
  1&gt;Target "_CopySourceItemsToOutputDirectory" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CopyFilesToOutputDirectory" depends on it):
  1&gt;Target "_CheckForCompileOutputs" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CopyFilesToOutputDirectory" depends on it):
  1&gt;Target "CopyFilesToOutputDirectory" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "PrepareForRun" depends on it):
  1&gt;  FSharpProject -&gt; c:\Projects\TestFSharpBuild\FSharpProject\bin\Debug\FSharpProject.dll
  1&gt;Target "PrepareForRun" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "_CleanGetCurrentAndPriorFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "IncrementalClean" depends on it):
  1&gt;Target "IncrementalClean" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "CoreBuild" depends on it):
  1&gt;Target "CoreBuild" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Build" depends on it):
  1&gt;Target "AfterBuild" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (target "Build" depends on it):
  1&gt;Target "Build" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "c:\Projects\TestFSharpBuild\FSharpProject\FSharpProject.fsproj" (entry point):
  ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
  </code></pre>