Solved

Error Creating ListView Control in Design View

Posted on 2010-09-16
6
2,040 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
ID: 33698505
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
ID: 33698550
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
ID: 33703837
.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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 13

Accepted Solution

by:
SameerJagdale earned 500 total points
ID: 33713945
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
ID: 33878066
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
ID: 34504892
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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

821 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