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

Unable to add project to solution - Project is not part of the workspace error #22

Open
mrward opened this issue Feb 6, 2016 · 0 comments

Comments

@mrward
Copy link
Owner

mrward commented Feb 6, 2016

Adding a new DNX web project to an existing solution and the New Project dialog did not close. Only seen this error once with Xamarin Studio 6.0. The IDE logs had the following exception. I suspect it might be related to the project's parent solution being removed for some reason, which was worked around in commit 80b0beb.

 An unhandled exception has occured. Terminating MonoDevelop? False
System.ArgumentException: '<Projectf79c4a12-1301-4f0b-bbb2-f5eed06a69c0>' is not part of the workspace.
   at Microsoft.CodeAnalysis.Workspace.CheckProjectIsInCurrentSolution(ProjectId projectId) in C:\Git\roslyn\src\Workspaces\Core\Portable\Workspace\Workspace.cs:line 1413
   at Microsoft.CodeAnalysis.Workspace.OnDocumentAdded(DocumentInfo documentInfo) in C:\Git\roslyn\src\Workspaces\Core\Portable\Workspace\Workspace.cs:line 612
   at MonoDevelop.Ide.TypeSystem.MonoDevelopWorkspace.OnFileAdded(Object sender, ProjectFileEventArgs args) in main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.TypeSystem\MonoDevelopWorkspace.cs:line 972
   at MonoDevelop.Projects.ProjectFileEventHandler.Invoke(Object sender, ProjectFileEventArgs e)
   at MonoDevelop.Projects.Project.DoOnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\Project.cs:line 2788
   at MonoDevelop.Projects.Project.DefaultMSBuildProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\Project.cs:line 2941
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Dnx.DnxProject.OnFileAddedToProject(ProjectFileEventArgs e) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\DnxProject.cs:line 173
   at MonoDevelop.Projects.ProjectExtension.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectExtension.cs:line 197
   at MonoDevelop.Projects.Project.OnFileAddedToProject(ProjectFileEventArgs e) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\Project.cs:line 2782
   at MonoDevelop.Projects.Project.NotifyFileAddedToProject(IEnumerable`1 objs) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\Project.cs:line 1913
   at MonoDevelop.Projects.Project.OnItemsAdded(IEnumerable`1 objs) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\Project.cs:line 1851
   at MonoDevelop.Projects.DotNetProject.OnItemsAdded(IEnumerable`1 objs) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\DotNetProject.cs:line 1428
   at MonoDevelop.Projects.ProjectItemCollection`1.NotifyAdded(IEnumerable`1 items, Boolean comesFromParent) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectItemCollection.cs:line 150
   at MonoDevelop.Projects.ProjectItemCollection`1.MonoDevelop.Projects.IItemListHandler.InternalAdd(IEnumerable`1 items, Boolean comesFromParent) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectItemCollection.cs:line 120
   at MonoDevelop.Projects.ProjectItemCollection`1.NotifyAdded(IEnumerable`1 items, Boolean comesFromParent) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectItemCollection.cs:line 148
   at MonoDevelop.Projects.ProjectItemCollection`1.OnItemsAdded(IEnumerable`1 items) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectItemCollection.cs:line 98
   at MonoDevelop.Projects.ProjectFileCollection.OnItemsAdded(IEnumerable`1 items) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectFileCollection.cs:line 194
   at MonoDevelop.Projects.ItemCollection`1.Add(T item) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ItemCollection.cs:line 64
   at MonoDevelop.Projects.Project.AddFile(String filename, String buildAction) in main\src\core\MonoDevelop.Core\MonoDevelop.Projects\Project.cs:line 1276
   at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddFileToProject(SolutionFolderItem policyParent, Project project, String language, String directory, String name) in main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Templates\SingleFileDescriptionTemplate.cs:line 121
   at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.AddToProject(SolutionFolderItem policyParent, Project project, String language, String directory, String name) in main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Templates\SingleFileDescriptionTemplate.cs:line 113
   at MonoDevelop.Dnx.FileTemplateProcessor.CreateFileFromTemplate(Project project, SolutionFolderItem policyItem, FilePath templateSourceDirectory, String fileTemplateName) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\FileTemplateProcessor.cs:line 88
   at MonoDevelop.Dnx.FileTemplateProcessor.CreateFileFromTemplate(Project project, FilePath templateSourceDirectory, String fileTemplateName) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\FileTemplateProcessor.cs:line 76
   at MonoDevelop.Dnx.FileTemplateProcessor.CreateFileFromTemplate(Project project, String projectTemplateName, String fileTemplateName) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\FileTemplateProcessor.cs:line 71
   at MonoDevelop.Dnx.FileTemplateProcessor.CreateFilesFromTemplate(DnxProject project, String projectTemplateName, String[] files) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\FileTemplateProcessor.cs:line 52
   at MonoDevelop.Dnx.DnxProjectTemplateWizard.CreateFilesFromTemplate(DnxProject project) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\DnxProjectTemplateWizard.cs:line 111
   at MonoDevelop.Dnx.DnxProjectTemplateWizard.CreateProject(Solution solution, SolutionFolder srcFolder, Boolean newSolution) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\DnxProjectTemplateWizard.cs:line 151
   at MonoDevelop.Dnx.DnxProjectTemplateWizard.ItemsCreated(IEnumerable`1 items) in F:\projects\monodevelop-dnx-addin\src\MonoDevelop.Dnx\MonoDevelop.Dnx\DnxProjectTemplateWizard.cs:line 78
   at MonoDevelop.Ide.Projects.NewProjectDialogController.<Create>d__126.MoveNext() in main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Projects\NewProjectController.cs:line 603
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MonoDevelop.Ide.Projects.GtkNewProjectDialogBackend.<MoveToNextPage>d__39.MoveNext() in main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Projects\GtkNewProjectDialogBackend.cs:line 412
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)
   at MonoDevelop.Ide.DispatchService.GtkSynchronizationContext.<>c__DisplayClass0_0.<Post>b__0(Object <sender>, EventArgs <e>) in main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\DispatchService.cs:line 52
   at Gtk.Application.InvokeCB.Invoke()
   at GLib.Timeout.TimeoutProxy.Handler()

I suspect this

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

No branches or pull requests

1 participant