Intellisense not recognizes extension methods for generic classes from .NET Standard 2.0 references
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Intellisense-not-recognizes-extension-me/10648843)._
---
\[severity:It’s more difficult to complete my work\]
I have a .NET Standard 2.0 Library in which I have defined this extension class.
```
public static class MyExtension
{
public static void ExtendEnumerable(this IEnumerable items) { }
public static void ExtendTObject(this T tObject) { }
}
```
There is a second .NET 8 project which references the .NET Standard 2.0 library. From whithin the .NET 8 project Intellisense doesn’t recognize `ExtendEnumerable<>` when the namespace is not already imported. It does tho recognizes `ExtendObject<>` and it also recognizes `MyExtension` class and imports the using properly.
Visual Studio option Text Editor > C# > Intellisense > Show items from unimported namespaces is enabled.
I provided a little sample project which contains the same extension class defined in 3 different frameworks. While `ExtendTObject<>` gets recognized correctly, `ExtendEnumerable<>` does so only for . NET6 and . NET8 libraries. See screenshot below:

---
### Original Comments
#### Feedback Bot on 4/29/2024, 03:59 AM:
(private comment, text removed)
---
### Original Solutions
(no solutions)
Contributor guide
Assessment
This issue has not been assessed yet.