You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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<T>(this IEnumerable<T> items) { }
public static void ExtendTObject<T>(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)
The text was updated successfully, but these errors were encountered:
This issue has been moved from a ticket on Developer Community.
[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.
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 recognizesExtendObject<>
and it also recognizesMyExtension
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)
The text was updated successfully, but these errors were encountered: