views:

346

answers:

2

I have a .net Solution that creates a DLL. It it made up of two projects. (Side information one contains a number of my special functions/classes etc. written in VB.Net. The second is some functions/classes etc. that are specific to a client and these use my classes) After some this and that and the other work I can build and rebuild the solution with no trouble. No error, warnings etc.

I check the project dependancies and they are correct. E.g. my code does not depend on the client code, but the client code does depend on my code. Build order: My code then client code. That all looks good to me.

Now just to be really sure that everything is ok I do a Build>Clean Solution. The following issues result: 1 warning (The reference componet ADODB could not be found) 6 Errors (All the errors are in my code and they center around the ADODB reference)

I can see that the ADODB reference in my code has a warning icon on it. However I just found that if I double click on the icon (in the solution explorer) The object browser is shown and the warning goes away.

If now I do two rebuilds the errors go away and everthing is happy.

Bottom line questions:

  1. Why is doing a Clean solution build causing these warnings and issues?
  2. What can I do so that these issues stop happening
A: 

I generally try to avoid using COM objects in .NET projects. You may have found one of the reasons for my preference. ;-)

Do both projects reference ADODB? Do they both reference the same version of the object?

John Saunders
Do both projects reference ADODB?No. The client specific code does not.
+1  A: 

(edited to try and respect the 2 questions you actually asked)

The yellow warning icon happened to me linking to a specific version of a third-party control. I referenced it against one version, then replaced the DLL with a new one and got the warning icon. Changing the "Specific Version" property of the reference to "False" got rid of the problem (as would leaving it "True" and changing the version number that is being referenced)

  1. Clean build perhaps erases stored configuration, which may include you ignoring the warning about ADODB.

  2. Maybe you are making reference to a specific version of ADODB, and should change it either to ignore version number, or update the version number.

Chris Cameron
Where in the Dev UI would I find this "Specific Version" property?
The Properties pane. Click on ADODB under "References" in the solution explorer, then look at the properties in the Properties pane.
Chris Cameron
View->Properties WindowIn case you don't have it open by default.
Chris Cameron