Adding a Reference to a Query Doesn't Always Show the Top Level Namespace to Import

I'm not sure if this is a bug, or if I'm missing something obvious in the query settings. I'm assuming the latter is the case. In short, should the top level namespace in an assembly automatically appear inside the Additional Namespace Imports tab Namespaces listbox in the Query Properties dialog?

The following steps illustrate what I'm seeing as an oversight on my part, and I'm hoping that someone could point out what I'm missing.

1.) Create a query of C# Statements and then press to bring up the Query Properties dialog.

2.) In the Additional References tab, add a reference to System.Globalization.dll.

3.) While still inside the Query Properties dialog, click on the Additional Namespace Imports tab. Then click on the System.Globalization.dll in the Assemblies: listbox. After clicking the System.Globalization.dll, I'm expecting that that System.Globalization namespace to appear inside the Namespaces: listbox, but it doesn't.


Why doesn't the namespace System.Globalization appear inside the Namespaces: listbox for addition as a namespace import to be added by clicking on the < Add Selected Namespaces button?

Any insights or help would be greatly appreciated.

Thank you in advance for your time and help.


  • My apologies for not including the LINQPad version in my original post. This issue occurs with LINQPad Version 5.26.01.
  • edited December 2017
    Your expectations are correct. However, System.Globalization.dll is a type-forwarding assembly. All that it contains are assembly attributes that redirect types such as System.Globalization.Calendar back to the .NET Framework assemblies such as mscorlib.dll and System.dll (so that portable libraries can work).

    System.Globalization.dll doesn't itself contain any namespaces or types, which is why you don't see any.
  • Thank you for the explanation, Joe. And more importantly, thank you for crafting an incredible development tool and supporting it.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!