project-system: Failed design-time builds can cause infinite loop of restores

When I changed the project to multiple platform, but forgot to change to TargetFrameworks. It will be in a forever loop to send design time build requests.

<TargetFramework>netcoreapp1.1;net47</TargetFramework>

It looks like this code is executed to remove targets and add them back repeatedly, which causes repeated design time builds.

Microsoft.VisualStudio.ProjectSystem.dll!Microsoft.VisualStudio.ProjectSystem.DataflowExtensions.LinkTo(System.Threading.Tasks.Dataflow.ISourceBlock<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<Microsoft.VisualStudio.ProjectSystem.IProjectSubscriptionUpdate>> differencingSnapshotBlock, System.Threading.Tasks.Dataflow.ITargetBlock<Microsoft.VisualStudio.ProjectSystem.IProjectVersionedValue<Microsoft.VisualStudio.ProjectSystem.IProjectSubscriptionUpdate>> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions, bool initialDataAsNew, bool suppressVersionOnlyUpdates, System.Collections.Generic.IEnumerable<string> ruleNames) Line 114	C#	Symbols loaded.
Microsoft.VisualStudio.ProjectSystem.Managed.VS.dll!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.CrossTarget.DependencySharedProjectsSubscriber.SubscribeToConfiguredProject(Microsoft.VisualStudio.ProjectSystem.IProjectSubscriptionService subscriptionService)	Unknown	No symbols loaded.
Microsoft.VisualStudio.ProjectSystem.Managed.VS.dll!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.CrossTarget.DependencySharedProjectsSubscriber.AddSubscriptionsAsync(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.CrossTarget.AggregateCrossTargetProjectContext newProjectContext)	Unknown	No symbols loaded.
Microsoft.VisualStudio.ProjectSystem.Managed.VS.dll!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.CrossTarget.CrossTargetSubscriptionHostBase.AddSubscriptionsAsync.AnonymousMethod__0()	Unknown	No symbols loaded.
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.ExecuteJob<Microsoft.VisualStudio.Threading.EmptyStruct>(System.Func<System.Threading.Tasks.Task> asyncMethod, Microsoft.VisualStudio.Threading.JoinableTask job)	Unknown	No symbols loaded.
Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.RunAsync(System.Func<System.Threading.Tasks.Task> asyncMethod, bool synchronouslyBlocking, Microsoft.VisualStudio.Threading.JoinableTaskCreationOptions creationOptions, System.Delegate entrypointOverride)	Unknown	No symbols loaded.
Microsoft.VisualStudio.ProjectSystem.dll!Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.LoadedProjectAsync(Microsoft.VisualStudio.ProjectSystem.IProjectAsynchronousTasksService asyncTaskService, System.Func<System.Threading.Tasks.Task> action, bool registerFaultHandler) Line 221	C#	Symbols loaded.
Microsoft.VisualStudio.ProjectSystem.Managed.VS.dll!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.CrossTarget.CrossTargetSubscriptionHostBase.AddSubscriptionsAsync(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.CrossTarget.AggregateCrossTargetProjectContext newProjectContext)	Unknown	No symbols loaded.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 20 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Having an EvaluationSucceeded state from CPS would be helpful. We also either need to have the previous return value of the target so that we nominate NuGet with the old information, or we need to be able to pass the EvaluationSucceeded flag to NuGet, so they know that the zero-value we pass when evaluation fails can be ignored /cc @emgarten