Namespace import incorrect in certain scenario

I'm using LINQPad 6.6.1, first, install NuGet package SharpDX.Direct2D1 latest(4.2.0) edition.

Write following code:


Click triangle and showing the correct namespace import options:

But after add SharpDX.Direct2D1 as namespace import option in Query Properties window:

Note SharpDX.WIC is missing in namespace import options, which I believe should be incorrect:


  • edited December 2019

    In the first instance, LINQPad generates the list of imports by searching all accessible types in the list of referenced assemblies. In the second instance, the items are generated by a Roslyn CodeFixProvider (this is normally triggered when there's an error, usually to resolve ambiguities). It seems that there's a bug in CSharpFullyQualifyCodeFixProvider which omits SharpDX.WIC. You'll see the same thing in Visual Studio if you create a project as follows:

    <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
         <PackageReference Include="SharpDX.Direct2D1" Version="4.2.0" />
Sign In or Register to comment.