Bug 6224 - NRE on refactoring
Summary: NRE on refactoring
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-07-20 21:04 UTC by Vitaliy Pfau
Modified: 2012-07-23 06:34 UTC (History)
1 user (show)

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:

Description Vitaliy Pfau 2012-07-20 21:04:45 UTC
Installation UUID: d51107f3-8e03-4fa6-a60c-f1100dfbfd26
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.2 (828)
	 Build 4D199
Monotouch: 5.2.12 (Evaluation)
Mono for Android not installed
Build information:
	Release ID: 30003004
	Git revision: 57eb8135299a707287d21a1e0ca1040babf6d9aa-dirty
	Build date: 2012-07-16 19:44:05+0000
	Xamarin addins: c331c3ba7ef02e9823ef5dfc9f6f9038f187158b
Operating System:
	Mac OS X 10.7.4
	Darwin jewel-mac.local 11.4.0 Darwin Kernel Version 11.4.0
	    Mon Apr  9 19:32:15 PDT 2012
	    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

1. I created a solution with two c# projects (library and console). 
2. MyClass has been renamed to File.cs in library project

using System;

namespace GEDCOM
	public class File
		public File(string fileName)

3. Right click on ANSIIEncoding. Selecting Resolve->System.Text.ANSIIEncoding menu gives me NRE dialog

System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Refactoring.ResolveCommandHandler+AddImport.Run () [0x0005c] in /Users/builder/data/lanes/monodevelop-mac-monodevelop-3.0.3-branch/57eb8135/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ResolveCommandHandler.cs:303 
  at MonoDevelop.Refactoring.ResolveCommandHandler.Run (System.Object data) [0x0000d] in /Users/builder/data/lanes/monodevelop-mac-monodevelop-3.0.3-branch/57eb8135/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ResolveCommandHandler.cs:323 
  at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-monodevelop-3.0.3-branch/57eb8135/source/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/builder/data/lanes/monodevelop-mac-monodevelop-3.0.3-branch/57eb8135/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1097 
  at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x002d1] in /Users/builder/data/lanes/monodevelop-mac-monodevelop-3.0.3-branch/57eb8135/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1067
Comment 1 Mike Krüger 2012-07-23 06:34:33 UTC
fixed 'Bug 6224 - NRE on refactoring'.