Bug 56958 - ListViewItemCount was not found
Summary: ListViewItemCount was not found
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 5.4 (2017-06)
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
Depends on:
Reported: 2017-05-30 10:56 UTC by John Bester
Modified: 2017-11-22 07:08 UTC (History)
1 user (show)

Is this bug a regression?: No
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 56958 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description John Bester 2017-05-30 10:56:31 UTC
This bug seems to have been around for 8 years or more (See this post from 2009: http://mono.1490590.n4.nabble.com/No-element-named-ListViewItemCount-could-be-found-td1550553.html). I have logged this bug in 2016 (see https://bugzilla.xamarin.com/show_bug.cgi?id=40237), but no one other than myself has even commented on it, so I assume I have logged the bug under the wrong component. Since I logged the bug, I have done a number of updates and re-tested the build that failed.

The build log reports this:

/usr/lib/mono/4.5/Microsoft.Common.targets: error : Tool exited with code: 1. Output: Error: Exception has been thrown by the target of an invocation.
Inner exception: Member 'ListViewItemCount' was not found.
Task "GenerateResource" execution -- FAILED 

I am using MonoDevelop 5.10 with default runtuime on Ubuntu Xenial (amd64). I have tried different target frameworks, but without any success. The project source I am compiling does not have "ItemCount" in any of the source files (.cs or .resx) of the module that fails to build, but a ListView component is used.

It seems to be a very simple bug to fix and yet it seems to make the ListView component completely unusable.