Take the 2-minute tour ×

We have a VS2008 CS DLL project targeting .NET 3.5. It builds successfully on our CI server when using MSBuild 3.5.

When CI is upgraded to use MSBuild 4.0, the same project fails to build, due to 1 warning message:

c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1418,9): warning MSB3283: Cannot find wrapper assembly for type library "ADODB".

The warning does not occur with MSBuild 3.5, and I'm surprised that it results in Build FAILED. We do not have the project set to treat warnings as errors.

All our other projects build successfully with either version of MSBuild.

share|improve this question
Why are you using v3.5 Microsoft.Common.targets with MSBuild 4.0? –  dtb Apr 22 '10 at 23:05
I believe that is due to the version in the .csproj file -- Project ToolsVersion="3.5" –  David White Apr 22 '10 at 23:26
add comment

3 Answers

up vote 1 down vote accepted

The error message was not telling the whole story. The ADODB assembly on our dev machines is loaded in the GAC. That was not the case on the CI build machine.

The reference to ADODB was only placed into our C# project by a TLBIMP pre-build task, within the C# project (along with references to MSXML and VBA dlls). The latter DLLs are included in our source code repository, and thus found during the CI build process. ADODB is not. However, we also discovered that we could safely remove from the C# project all the added references, including the one to ADODB.DLL.

This fixed the problem. (Thanks for your suggestions -- they kept me thinking till we got there.)

share|improve this answer
add comment

Try either removing any hardwired toolsversion in your msbuild (and csproj) files, or setting them to ToolsVersion="4.0".

Read: http://msdn.microsoft.com/en-us/library/bb383796.aspx for a better understanding of the significance of the attribute. Since you want to target 3.5, make sure you have the target framework version set up correctly by checking that the TargetFrameworkVersion in your csproj.


If you set the ToolsVersion to 4.0, any machine that wants to build the project, will have a dependency on the 4.0 framework (which has the 4.0 msbuild), even though you're targetting 3.5.

If you're targetting 3.5, and your projects are VS2008, there's no need to use msbuild 4.0 over msbuild 3.5 (they can exist peacefully side by side). Just using the 3.5 msbuild would be the simpler solution.

share|improve this answer
That sounds plausible, and I read the link you provided. I made the change in the build file and in the csproj file. But the error is still the same, except that it has occurred in .NET Framework v4.0.30319 now. While we are targetting 3.5, and the project is currently VS2008 (soon to be upgraded -- which should solve this problem), for CruiseControl.NET you set the version of MSBuild in the ccnet.config file, ie globally for all projects. Since we have VS2010 projects running under CC.NET, this needs to be v4.0. –  David White Apr 26 '10 at 1:14
Would it be possible to have your main CI build script spawn an msbuild 3.5 and build the 2008/3.5 project through the spawned msbuild? Spawning can be done through the 'exec' msbuild task. –  Frederik Apr 26 '10 at 14:46
That sounds like an idea worth trying. Will report back. –  David White Apr 27 '10 at 21:49
add comment

This is a ClickOnce issue. Remove that dependency from the list.

BTW, this bug is present in VS2008 too, but seems to not have triggered for you.

share|improve this answer
We are not using ClickOnce, so I don't understand how this could be a ClickOnce issue? What dependency am I looking for? –  David White Apr 26 '10 at 0:50
@David White: ADODB, IIRC it gets included with Report Viewer in my case, but something else might 'require' it. ClickOnce errorred on this for us, but the issue could be earlier. Make sure you have no ClickOnce settings in the project files (or just search the project file text for ADODB reference). –  leppie Apr 26 '10 at 6:03
ADODB is required. –  David White Apr 27 '10 at 21:52
add comment

Your Answer


