447 Magic intellisense for unreferenced types not available.

In a recent EAP build, you had a very cool feature that provided intellisense for types in assemblies that were not yet referenced.

See this post for a more complete description: http://extraview.co.uk/blog/PermaLink,guid,e6c6072b-ef43-4fe3-957c-e22c20da0f95.aspx

It certainly does not seem to work in 447 for a console app and the ConfigurationManager class.

Is this feature in or out?

8 comments
Comment actions Permalink

Hello James,

could you please be more specific - what exactly doesn't work? If you mean
the context action 'Add reference
to an assembly and import type from it', it is indeed new for 3.0. And we
recently fixed a bug that prevented it from working in ASP.NET projects.
However, the ConfigurationManager class in a Console Application project
should be imported just fine. One clarifying note about this context action
- it suggest to reference an assembly only if
this assembly contains the unresolved type, the assembly is not referenced
in the current project but IS referenced
in another project in the solution (so that ReSharper is aware of it at all).
If the assembly is not referenced somewhere in the solution, it will not
be suggested.


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


In a recent EAP build, you had a very cool feature that
provided intellisense for types in assemblies that were not yet
referenced.

See this post for a more complete description:
http://extraview.co.uk/blog/PermaLink,guid,e6c6072b-ef43-4fe3-957c-e22
c20da0f95.aspx

It certainly does not seem to work in 447 for a console app and the
ConfigurationManager class.

Is this feature in or out?



0
Comment actions Permalink

Hello Dmitry,

I think it is about types from known but unreferenced assemblies are not
shown in type completion. They should, I think.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


DS> Hello James,
DS>
DS> could you please be more specific - what exactly doesn't work? If
DS> you mean
DS> the context action 'Add reference
DS> to an assembly and import type from it', it is indeed new for 3.0.
DS> And we
DS> recently fixed a bug that prevented it from working in ASP.NET
DS> projects.
DS> However, the ConfigurationManager class in a Console Application
DS> project
DS> should be imported just fine. One clarifying note about this context
DS> action
DS> - it suggest to reference an assembly only if
DS> this assembly contains the unresolved type, the assembly is not
DS> referenced
DS> in the current project but IS referenced
DS> in another project in the solution (so that ReSharper is aware of it
DS> at all).
DS> If the assembly is not referenced somewhere in the solution, it will
DS> not
DS> be suggested.
DS> Dmitry Shaporenkov
DS> JetBrains, Inc
DS> http://www.jetbrains.com
DS> "Develop with pleasure!"
>> In a recent EAP build, you had a very cool feature that
>> provided intellisense for types in assemblies that were not yet
>> referenced.
>>
>> See this post for a more complete description:
>> http://extraview.co.uk/blog/PermaLink,guid,e6c6072b-ef43-4fe3-957c-e2
>> 2 c20da0f95.aspx
>>
>> It certainly does not seem to work in 447 for a console app and the
>> ConfigurationManager class.
>>
>> Is this feature in or out?
>>


0
Comment actions Permalink

Hello Ilya,

Really? I didn't know :)


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


Hello Dmitry,

I think it is about types from known but unreferenced assemblies are
not shown in type completion. They should, I think.

Sincerely,
Ilya Ryzhenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

DS>> Hello James,
DS>>
DS>> could you please be more specific - what exactly doesn't work? If
DS>> you mean
DS>> the context action 'Add reference
DS>> to an assembly and import type from it', it is indeed new for 3.0.
DS>> And we
DS>> recently fixed a bug that prevented it from working in ASP.NET
DS>> projects.
DS>> However, the ConfigurationManager class in a Console Application
DS>> project
DS>> should be imported just fine. One clarifying note about this
DS>> context
DS>> action
DS>> - it suggest to reference an assembly only if
DS>> this assembly contains the unresolved type, the assembly is not
DS>> referenced
DS>> in the current project but IS referenced
DS>> in another project in the solution (so that ReSharper is aware of
DS>> it
DS>> at all).
DS>> If the assembly is not referenced somewhere in the solution, it
DS>> will
DS>> not
DS>> be suggested.
DS>> Dmitry Shaporenkov
DS>> JetBrains, Inc
DS>> http://www.jetbrains.com
DS>> "Develop with pleasure!"
>>> In a recent EAP build, you had a very cool feature that
>>> provided intellisense for types in assemblies that were not yet
>>> referenced.
>>>
>>> See this post for a more complete description:
>>> http://extraview.co.uk/blog/PermaLink,guid,e6c6072b-ef43-4fe3-957c-e
>>> 2 2 c20da0f95.aspx
>>>
>>> It certainly does not seem to work in 447 for a console app and the
>>> ConfigurationManager class.
>>>
>>> Is this feature in or out?
>>>


0
Comment actions Permalink

Hello James,

Actually this functionality never worked at full. You could complete a
class from unreferenced assembly but it wouldn't add neccessary using directives
and all that stuff. So it was just equivalent to manually typing in the name
of the class. And we fixed that bug.

Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

In a recent EAP build, you had a very cool feature that
provided intellisense for types in assemblies that were not yet
referenced.

See this post for a more complete description:
http://extraview.co.uk/blog/PermaLink,guid,e6c6072b-ef43-4fe3-957c-e22
c20da0f95.aspx

It certainly does not seem to work in 447 for a console app and the
ConfigurationManager class.

Is this feature in or out?



0
Comment actions Permalink

Hello Dmitry,

Ilya is correct. In a recent v3 EAP build, R# would provide intellisense on certain .Net types that were not yet referenced in the project. R# provided intellisense for the item and then underlined the code in red, stating that a reference needed to be added to a system assembly (it also indicates which assembly).

I have done a bit more research on this. The build that had this feature working was almost certainly 423.

Specifically, I had a a solution containing an ASP.NET project and a class library. The ASP.NET project automatically includes a reference to System.Configuration (although I do not know how relevant the presence of this referernce was to the feature).

In the class library that had no reference to the System.Configuration assembly, typing WebConfig followed by <Ctrl><Alt><SpaceBar> brought up an auto-completion list that contained an entry for WebConfigurationManager.

In the latest stable EAP build (447), under the same test, a completion item for ConfigurationManager is not available.

Also, it would be very, very useful to have this feature documented somewhere. How does it work? What unreferenced assemblies does it reach out to?

I think the following functionality would be useful:

1/ Reach out and provided intellisense (using CtrlAltSpacebar) to all unreferenced assemblies that are listed in the .Net tab of the Add Reference dialog.

2/ Reach out and provided intellisense (using CtrlAltSpacebar) to all unreferenced projects in the solution.

3/ Instead of providing a red squigly with text informing that a reference needs to be added, actually have R# prompt and add the reference to the project using the same model as the automatic help for importing namespaces. (Obviously, assembly references for assemblies outside of the solution and project references for projects).

4/ My solutions often contain a folder that holds 3rd party assemblies to ensure that all developers are referencing the correct version of these assemblies. It would be great if R# could be configured to look for these assemblies (most likely scenario is to give R# a solution folder name that can be searched).

Sample files attached. See Class1.cs



Attachment(s):
WebApplicationNoMagicAutoCompletion.zip
0
Comment actions Permalink

I disagree that it was "just equivalent to manually typing in the name
of the class".

I got type completion on the class and auto completion lists for the class members even though the project did not contain a reference to the required assembly. Adding a reference to the (prompted) assembly subsequently led to R# prompting to import the require namespace.

IMO, the only step that was missing was for R# to prompt and add the actual missing reference for me. But, as this is a brand new feature, I assumed that such a full and complete implementation may not have been available in that build.

I am surprised that this feature is not noted in your "new features" page. It seems to me that it is a very strong feature to have in your product.

0
Comment actions Permalink

Hello,

We appreciate your feedback.

The corresponding JIRA request has been created, and you are welcome to monitor
its status at http://www.jetbrains.net/jira/browse/RSRP-42668.

Best regards,
- Development Team.


0
Comment actions Permalink

I just found this lovely new 3.0 feature (see attached image).

For the benefit of others, this is Resharper prompting to automatically add a reference to your project in order to consume the type correctly. A bit like adding a using directive, but for assembly references instead!

Despite some warranted flak, you guys do come up with some fantastic productivity enhancers.

Keep up the hard work.



Attachment(s):
resharper_reaches_out.png
0

Please sign in to leave a comment.