Resharper 6.1: Reference suggestions not always working

Hi everyone,

I got a strange problem regarding reference suggestions from Resharper. For example, when I type:


in C#, Resharper suggests the option "Reference 'System.xml' and use 'System.Xml.Serialization.XmlSerializer'". Just fine.

But when I try to do the same for the "Color" class (which is contained in System.Drawing) I do not get that suggestion; it just proposes other options like creating the class or something else.

When I try this Color class on another computer, it does suggest to reference System.Drawing. I've searched for this problem but no-one seems to have the same issues. Do I have to index all the default system assemblies in resharper first? If so, how?

Any suggestion is welcome.


Comment actions Permalink

Update: I found out how to get it working, but I'm not sure if this was Jetbrain's intention. You can reproduce the problem the following way:

1. Create a new blank solution
2. Add a Console Application
3. Try to reference the Color or HttpContext class in your Program.cs using resharper - that choice won't be in the action list
4. Add a Class Library to your solution
5. Repeat step 3 - now that option is available!
6. Undo step 4 - remove the class library
7. Again, you will not succeed to in step 3

Bug or feature? Anyone?

Comment actions Permalink

Is it the target profile? Console applications tend to default to the client profile, which doesn't include System.Web, so I wouldn't expect to see an action to reference it.

Having said that, System.Drawing is part of the client profile.

Comment actions Permalink

Profile is set to .NET 4.0, not the client profile...a lot of classes can't be automatically referenced until I add a Class Project. Of course, referencing them manual is no problem at all.


Please sign in to leave a comment.