Bug 2979 - Exception exporting project from within solution
Summary: Exception exporting project from within solution
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-19 21:00 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-01-24 14:37 UTC (History)
2 users (show)

Tags: trident
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mikayla Hutchinson [MSFT] 2012-01-19 21:00:33 UTC
When exporting a project within a solution an exception is shown.

To reproduce this, select a project within a solution that has a reference to a another project in the solution. Run the Project->Export command. The exception will be shown.

This does not happen when a solution or a project without references to other projects is selected.

Exception:

System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler.SaveReference (IProgressMonitor monitor, MonoDevelop.Projects.Formats.MSBuild.MSBuildSerializer ser, MonoDevelop.Projects.Formats.MSBuild.MSBuildProject msproject, MonoDevelop.Projects.ProjectReference pref, System.Collections.Generic.Dictionary`2 oldItems) [0x00394] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs:1249 
  at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler.SaveItem (IProgressMonitor monitor, MonoDevelop.Projects.Formats.MSBuild.MSBuildSerializer ser, MonoDevelop.Projects.Formats.MSBuild.MSBuildProject msproject, System.Object ob, System.Collections.Generic.Dictionary`2 oldItems) [0x0000c] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs:1082 
  at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler.SaveItem (IProgressMonitor monitor) [0x00a2e] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs:971 
  at MonoDevelop.Projects.Formats.MSBuild.MSBuildHandler.Save (IProgressMonitor monitor) [0x0007e] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildHandler.cs:128 
  at MonoDevelop.Projects.SolutionEntityItem.OnSave (IProgressMonitor monitor) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs:306 
  at MonoDevelop.Projects.DotNetProject.OnSave (IProgressMonitor monitor) [0x00027] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs:734 
  at MonoDevelop.Projects.DefaultProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem entry) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:647 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Autotools.MakefileProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem entry) [0x00000] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs:101 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.CompiledAssemblyExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CompiledAssemblyProject.cs:230 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.ProjectServiceExtension.Save (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem item) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:66 
  at MonoDevelop.Projects.SolutionEntityItem.Save (IProgressMonitor monitor) [0x0002b] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs:253 
  at MonoDevelop.Projects.ProjectService.Export (IProgressMonitor monitor, IWorkspaceFileObject obj, System.String[] includedChildIds, System.String targetPath, MonoDevelop.Projects.FileFormat format) [0x00271] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:419 
  at MonoDevelop.Projects.ProjectService.Export (IProgressMonitor monitor, System.String rootSourceFile, System.String[] includedChildIds, System.String targetPath, MonoDevelop.Projects.FileFormat format) [0x0003b] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:357 
  at MonoDevelop.Projects.ProjectService.Export (IProgressMonitor monitor, System.String rootSourceFile, System.String targetPath, MonoDevelop.Projects.FileFormat format) [0x00009] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:342 
  at MonoDevelop.Ide.ProjectOperations.Export (IWorkspaceObject entry, MonoDevelop.Projects.FileFormat format) [0x00059] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:351 
  at MonoDevelop.Ide.Commands.ExportProjectHandler.Run () [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs:494 
  at MonoDevelop.Components.Commands.CommandHandler.Run (System.Object dataItem) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:61 
  at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00000] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:42 
  at MonoDevelop.Components.Commands.CommandManager.DefaultDispatchCommand (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info, System.Object dataItem, System.Object target, CommandSource source) [0x00076] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:696 
  at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x002d1] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:666
Comment 1 Jeffrey Stedfast 2012-01-24 14:37:42 UTC
Fixed in git master