Click here to Skip to main content
15,117,719 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I just rebuilt my visual basic 2010 project and now i can't build my project after making changes. Whenever I click build it gives me the error System.TypeLoadException - Could not load type 'ADODB._Recordset_Deprecated' from assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

What's causing that problem? How do I solve it? Please help!!!!
Posted

1 solution

Rebuild first cleans all the project output in your solution, then builds the projects based on their project dependencies. It would seem that one of your projects has a dependency on another project that pulls in ADODB or even generates a class using ADODB.

If you right-click on your solution node in Solution Explorer, click Project Dependencies, and for each project in the combobox make sure you have checked all the projects which must be built first.

This is automatic if instead of adding project output as other projects' dependencies, you actually add the project itself. You can do this within a project when you right-click on the project and select Add Reference. Click on the Projects tab, and select the project(s) which have output you depend on. This automatically establishes project dependencies in the correct order (just avoid cycles).
   
Comments
obhasha07 14-Jul-11 19:28pm
   
I doing what you said but my project has no dependancies. It was originally a VB.2005 project but I converted it to VB 2010. Ever since then this happens every time I rebuild. I used to restore a recent back up and after that it works. But sadly I don't have any recent backups at the moment. So I need another solution
Please help!!!
Heath Stewart 14-Jul-11 19:31pm
   
That wasn't mentioned in your original question. If that is the case, then that version of the ADODB assembly is probably no longer installed or deprecated. For whichever project is failing, add a reference and look for ADODB in the assembly list. Also, during the conversion the wizard shouldn't raised any warnings or errors. If those reports are still available, you should review it for any prescribed fixes.

In general, you might consider moving to ADO.NET instead of ADO. The concepts are similar but there's more power and abstraction in ADO.NET. I would imagine that the conversion report would direct you to more information about how to do that.
obhasha07 14-Jul-11 21:59pm
   
You're right. Your answer inspired me for the solution. It was an adodb reference that was causing the problem. I removed it and now the project builds fine. Although I haven't tested a rebuild. Better make a back up before doing that. Thanks man!!!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900