File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 401401 <Target Name =" Workaround_CopyResolvedFilesToPublishPreserveNewest" BeforeTargets =" _CopyResolvedFilesToPublishPreserveNewest" DependsOnTargets =" GenerateManifests" />
402402
403403 <Import Project =" DoNotGenerateSatelliteAssemblies_Workaround.targets" Condition =" '$(GenerateSatelliteAssemblies)' == 'false'" />
404+
405+ <!--
406+ This target uses Inputs/Outputs so when it is skipped because they are up to date, ApplyOptimizations is skipped.
407+ This is a workaround for https://github.com/dotnet/roslyn/issues/77941.
408+ -->
409+ <Target Name =" _DisableApplyOptimizations"
410+ BeforeTargets =" _InitializeAssemblyOptimizationWithTargetAssembly" >
411+ <PropertyGroup >
412+ <EnableNgenOptimization >false</EnableNgenOptimization >
413+ </PropertyGroup >
414+ </Target >
415+ <Target Name =" _DetermineIfApplyOptimizationsShouldBeDisabled"
416+ AfterTargets =" _DisableApplyOptimizations"
417+ Inputs =" $(MSBuildAllProjects);@(IntermediateAssembly)"
418+ Outputs =" @(IntermediateAssembly);$(PostCompileBinaryModificationSentinelFile)" >
419+ <CallTarget Targets =" _EnableApplyOptimizations" />
420+ </Target >
421+ <Target Name =" _EnableApplyOptimizations" >
422+ <PropertyGroup >
423+ <EnableNgenOptimization >true</EnableNgenOptimization >
424+ </PropertyGroup >
425+ </Target >
404426</Project >
You can’t perform that action at this time.
0 commit comments