ResolveReferences dependency on GenerateBindingRedirects target causes intermittent publishing failures #10901
Labels
Area-NetSDK
gathering-feedback
The issue requires feedback in order to be planned, please comment if the feature is useful for you
triaged
Problem
Roslyn build from Visual Studio intermittently fails with error:
This is caused by the following sequence of events:
PublishedProjectOutputGroup
, which depends on targetPublishItemsOutputGroup
.PublishVsixItems
, which depends on targetPublish
and transitively also onPublishItemsOutputGroup
.PublishItemsOutputGroup
depends onResolveReferences
, which depends onGenerateBindingRedirects
.GenerateBindingRedirects
has condition'$(BuildingProject)' == 'true'"
.BuildingProject
property is set byBuildOnlySettings
in various targets that need to build assets (Build
,Publish
, etc.). However,BuildOnlySettings
is not set byPublishItemsOutputGroup
as this target should only determine the items to be published but not publish them.The invocation of
PublishItemsOutputGroup
in [1] skips generation of binding redirects (BuildingProject
is `false') and the second invocation is skipped because the target already executed. As a result the App.config file is never written to and the build subsequently fails to copy the file.Binlog: RoslynVSBuild.zip
Proposal
It doesn't seem like
ResolveReferences
should depend on the content of the generated App.config file. It should therefore not depend onGenerateBindingRedirects
target:The text was updated successfully, but these errors were encountered: