when i type 'ConfigurationManager', resharper dont give me the option to reference the system.configuration.dll automatically

i know when i type some 'Class' name, and the corresponding library was not referenced, resharper 's quickfix feature gives me the options to reference that dll automatically,even that 'Class' is defined in my another library project( the same solution of course)
but when the 'Class' comes to 'ConfigurationManager' it seems resharper can not recognize that, can therefore lost the option to add that reference directly for me.

3 comments

As far as my experience with R# goes, it only suggests classes from:

  • either your other projects within the solution you work on;
  • or from assemblies, referenced by any of projects within the solution you work on.


So, in your case, if you have solution with ProjectA and ProjectB, and project B references System.Configuration, then when you type ConfigurationManager in ProjectA's class, R# will suggest you to import System.Configuration namespace. However, if ProjectB doesn't use it, R# will not suggest anything.

Simply, R# can't know everything about all assemblies on your PC (it would be too heavy job to keep that up to date, and would suggest too much junk you'd never really use). Instead, it only knows everything about all referenced projects and assemblies within the solution you work with. And with this it works just fine.

I hope that helps.

Ivan

0

Hello Kevin,

Ivan is correct, at the moment ReSharper suggests to reference System.Configuration.ConfigurationManager
only when there's any project in the current solution that references System.Configuration.
Please let me know if this is not the case for you and ReSharper doesn't
offer the quick-fix even if System.Configuration is referenced by one of
your projects. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

i know when i type some 'Class' name, and the corresponding library
was not referenced, resharper 's quickfix feature gives me the options
to reference that dll automatically,even that 'Class' is defined in my
another library project( the same solution of course)

but when the 'Class' comes to 'ConfigurationManager' it seems
resharper can not recognize that, can therefore lost the option to add
that reference directly for me.

---
Original message URL:
http://devnet.jetbrains.net/message/5299147#5299147



0

got it. thanks for your information.
it did take up too much resources to memorize all the type information.

0

Please sign in to leave a comment.