Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Error Creating ListView Control in Design View

Posted on 2010-09-16
6
Medium Priority
?
2,081 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 13

Accepted Solution

by:
SameerJagdale earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

971 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