Bug 5175 - Error message appears when some C# solutions are opened on MonoDevelop 3.0
Summary: Error message appears when some C# solutions are opened on MonoDevelop 3.0
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 3.0.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2012-05-18 12:59 UTC by John Platts
Modified: 2015-07-02 10:34 UTC (History)
1 user (show)

Tags:
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 John Platts 2012-05-18 12:59:02 UTC
Whenever I open some C# solutions in MonoDevelop 3.0 on Windows, I get the following error message:
Error while trying to load the project: Object reference not set to an instance of an object.

If I close the solution, and then re-open the solution, the solution opens successfully and the above error message does not appear.
Comment 1 Mikayla Hutchinson [MSFT] 2012-05-18 13:20:38 UTC
What kinds of projects? DO you have a full stack trace for the exception?

You can find log files in AppData\Local\MonoDevelop-3.0\Logs
Comment 2 John Platts 2012-05-19 11:11:41 UTC
This error occurs on solutions with 2 or more C# projects. I do have a full stack trace for the exception, and here is the full stack trace (with the actual C# project path replaced with ~ characters):
ERROR [2012-05-18 11:55:05Z]: Error while trying to load the project ~~~~~~~~
System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoDevelop.Core.Serialization.DataContext.IncludeType(RuntimeAddin addin, String typeName, String itemName)
   at MonoDevelop.Projects.ProjectService.InitializeDataContext(DataContext ctx)
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectService.get_DataContext()
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildSerializer..ctor(String baseFile)
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler.CreateSerializer()
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler.Load(IProgressMonitor monitor, MSBuildProject msproject)
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectHandler.Load(IProgressMonitor monitor, String fileName, MSBuildFileFormat expectedFormat, String language, Type itemClass)
   at MonoDevelop.Projects.Extensions.DotNetProjectNode.LoadSolutionItem(IProgressMonitor monitor, String fileName, MSBuildFileFormat expectedFormat, String itemGuid)
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectService.LoadItem(IProgressMonitor monitor, String fileName, MSBuildFileFormat expectedFormat, String typeGuid, String itemGuid)
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.<>c__DisplayClass6.<LoadSolution>b__2(IProgressMonitor , String )
   at MonoDevelop.Projects.DefaultProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.CompiledAssemblyExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName)
   at MonoDevelop.Projects.ProjectServiceExtension.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.Extensions.ProjectExtensionUtil.LoadSolutionItem(IProgressMonitor monitor, String fileName, ItemLoadCallback callback)
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.LoadSolution(Solution sol, String fileName, MSBuildFileFormat format, IProgressMonitor monitor)
Comment 3 Lluis Sanchez 2015-07-02 10:34:41 UTC
Already fixed in current XS.