Solved

Error Creating ListView Control in Design View

Posted on 2010-09-16
6
2,053 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

623 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