@@ -328,6 +328,48 @@ this file.
328328 ============================================================
329329-->
330330
331+ <!--
332+ ============================================================
333+ Override _GenerateCompileDependencyCache
334+
335+ Workaround for Issue #3824 and #3739
336+
337+ MsBuild does some optimisations around CompileInputs
338+ The project system erroneously uses this to determine whether
339+ to notify language services of CommandLine Information changes.
340+ C# accidently changes it's file lists every build ... and so
341+ gets the notifications.
342+ F# doesn't ... so we don't get CL notifications following rebuilds
343+ or build.
344+ This workaround is basically to adds the current time (in ticks)
345+ into the hash of CoreCompileInputs.cache at design time so that
346+ we always appear to have different options and overcome the
347+ brokencache behaviour.
348+
349+ Both msbuild and the project-system will fix their code at which time
350+ this can go away.
351+
352+ ============================================================
353+ -->
354+ <Target Name =" _GenerateCompileDependencyCache" DependsOnTargets =" ResolveAssemblyReferences" Condition =" '$(DesignTimeBuild)' == 'true'" >
355+ <ItemGroup >
356+ <CustomAdditionalCompileInputs Include =" $(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" />
357+ <CoreCompileCache Remove =" @(Compile)" />
358+ <CoreCompileCache Include =" @(ReferencePath)" />
359+ <CoreCompileCache Include =" $([System.DateTime]::Now.Ticks)" />
360+ </ItemGroup >
361+
362+ <Hash ItemsToHash =" @(CoreCompileCache)" >
363+ <Output TaskParameter =" HashResult" PropertyName =" CoreCompileDependencyHash" />
364+ </Hash >
365+
366+ <WriteLinesToFile Lines =" $(CoreCompileDependencyHash)" File =" $(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" Overwrite =" True" WriteOnlyWhenDifferent =" True" />
367+
368+ <ItemGroup >
369+ <FileWrites Include =" $(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" />
370+ </ItemGroup >
371+ </Target >
372+
331373 <Target Name =" GenerateTargetFrameworkMonikerAttribute" BeforeTargets =" BeforeCompile" DependsOnTargets =" PrepareForBuild;GetReferenceAssemblyPaths" Inputs =" $(MSBuildThisFileFullPath)" Outputs =" $(TargetFrameworkMonikerAssemblyAttributesPath)" Condition =" '$(GenerateTargetFrameworkAttribute)' == 'true'" >
332374
333375 <PropertyGroup >