Solved

Error Creating ListView Control in Design View

Posted on 2010-09-16
6
2,011 Views
Last Modified: 2012-06-27
I have an aspx page in a web (vb.net) application with a sqldatasource and I am trying to drop a listview into the designer view of Visual Studio 2010, but I am getting the following error in the designer view:

Error Creating Control - ListView1
Failed to create designer 'System.Web.UI.WebControls.ListView, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

Some related oddities:

My web.config doesn't list version 4.0.0.0 anywhere.
When I hover over the ListView in the Toolbox, it claims to be Version 3.5.0.0.
All the other data controls (DetailsView, GridView, etc.) appear to work in designer view

I've tried resetting the toolbox items, but that didn't work.  If you've seen this before and resolved it, please let me know what you did, I am quite baffled!  I can provide screenshots and code if needed.  Thanks in advance!
0
Comment
Question by:MeteorComm
  • 4
  • 2
6 Comments
 
LVL 13

Expert Comment

by:SameerJagdale
Comment Utility
this is version conflct, the listview control is not able to find the matching designer for 4.0, check for the correct namespaces, or if you are not doing anything specific to 4.0, try changing the framework version to 3.5.
0
 

Author Comment

by:MeteorComm
Comment Utility
The framework version is and always has been 3.5, there is no reference to 4.0 anywhere (except for the error message), which is why it is so baffling.
0
 

Author Comment

by:MeteorComm
Comment Utility
.Net Framework 4 is installed on the machine, because it comes pre-packaged with VS 2010, but the application is a 3.5 app. But somehow, parts of it are still trying to reference 4.0 though.

I'm getting a runtime error on the page directive in Visual Studio saying that my masterpage cannot be processed because the code directory has not yet been built.  And when I debug, even though it comes up fine in the browser, I get the following error:

Error      2      The type 'System.Web.Compilation.WCFBuildProvider' is ambiguous: it could come from assembly 'C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' or from assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll'. Please specify the assembly explicitly in the type name.      App_WebReferences/      

How do I remove the ambiguity and ensure that everything points to 3.5?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 13

Accepted Solution

by:
SameerJagdale earned 500 total points
Comment Utility
try dereferencing -
remove System.Web.Extensions refrence from your project and add it from -
 C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35 folder.
0
 

Author Closing Comment

by:MeteorComm
Comment Utility
I never had time to try out your suggestion unfortunately, but I'm moving to a new system now anyway and am hoping that will solve it.  
0
 

Author Comment

by:MeteorComm
Comment Utility
So I ran into this issue again on my new system and tried your suggestion...I removed the visible system.web.extensions (which listed version 3.5) from the References list but was unable to add it again because it says that one already exists. Where is it?!? It's not in web.config and it's not listed in References. If I try attempting to add a ListView, design view still complains about version 4.0.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now