Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFW: InvalidOperationException: The project already references the target project. #43632

Closed
davkean opened this issue Apr 24, 2020 · 5 comments
Assignees
Milestone

Comments

@davkean
Copy link
Member

davkean commented Apr 24, 2020

This is the #4 highest non-fatal watson for the project-system, with 13% of all hits. This is a regression in 16.6-pre3.

Version Used:
16.6-pre3

Steps to Reproduce:

InvalidOperationException: The project already references the target project.
Microsoft.CodeAnalysis.Solution.AddProjectReferences(ProjectId,IEnumerable`1)
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProject.<>c__DisplayClass85_0.<OnBatchScopeDisposed>b__0(Solution)
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioWorkspaceImpl.ApplyBatchChangeToWorkspace(Func`2)
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProject.OnBatchScopeDisposed()
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProject.BatchScope.Dispose()
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.CPS.CPSProject.EndBatch()
Microsoft.VisualStudio.ProjectSystem.LanguageServices.WorkspaceProjectContextHost.WorkspaceProjectContextHostInstance.<ApplyProjectChangesUnderLockAsync>d__19.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task)
Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.<>c__DisplayClass3_0.<<ExecuteAsync>b__0>d.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task)
Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter.GetResult()
Microsoft.VisualStudio.Threading.ReentrantSemaphore.StackSemaphore.<ExecuteAsync>d__3.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task)
Microsoft.VisualStudio.ProjectSystem.OnceInitializedOnceDisposedUnderLockAsync.<ExecuteUnderLockCoreAsync>d__7.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task)
Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1.<ProcessInputQueueAsync>d__5.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception)
Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__action|0()
GuardMethodClass.GuardMethod(Func`1,Func`2,Func`2)

@jasonmalinowski
Copy link
Member

Is this a dupe of #39032?

@davkean
Copy link
Member Author

davkean commented Apr 25, 2020

Yes looks like it. We've started reporting it now, hence why showing up.

@davkean
Copy link
Member Author

davkean commented Apr 25, 2020

I think the EndBatch call was hiding this one, hence why its new for 16.3 pre3.

@davkean
Copy link
Member Author

davkean commented Apr 29, 2020

There might be a dump in dotnet/project-system#6141.

@davkean
Copy link
Member Author

davkean commented Apr 29, 2020

You'll need to pull uncollected exceptions off the stack/heap.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants