Could not find an implementation of the query pattern for source type

Problem Any time you try to use a Linq extension method (such as Select() to transform list elements) and you haven’t added ‘using System.Linq’, you’ll get a compiler error like this: Could not find an implementation of the query pattern for source type ‘Your Type’.  ‘Select’ not found. In newer versions, the error looks like … Read more

Objects added to a BindingSource’s list must all be of the same type

Problem When you’re binding a control to a list of objects by adding a BindingList to a BindingSource, you get the following exception: System.InvalidOperationException: Objects added to a BindingSource’s list must all be of the same type. Here’s the code causing this: Solution Instead of adding the BindingList to the BindingSource with Add(), set BindingSource.DataSource … Read more

ReportViewer doesn’t appear in the toolbox in Visual Studio

Problem You’re trying to use the ReportViewer control in Visual Studio but it’s not in the toolbox. Other symptoms: Solution Note: Tested in Visual Studio 2017 and Visual Studio 2019. The exact instructions may have slightly different steps depending on which version of VS you’re using. There are two different problems to solve. First, you … Read more