Warning MSB3283: Cannot find wrapper assembly for type library "MSComctlLib". When building my app
Asked Answered
E

2

5

I have a Visual Studio solution that's been around for years. The project is a Visual Studio 2010 project, and I've been able to compile and run the project for years. This application is a critical application and only rarely do I need to launch the project and make minor changes for bug fixes that have been discovered.

Today, I needed to do a bit of research. I opened the project on my old Windows XP dev box which is the same machine that I've developed on for years. I'm quite confident that nothing on this machine has changed, though there is a small chance that IT has pushed a Windows Update that I may not be aware of.

I opened my Project, and immediately hit the Run button on the toolbar. The app will no longer compile. It gets to the last project (of 7) in the solution and gives me the following output:

------ Build started: Project: QSApplication, Configuration: Debug Any CPU ------
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3283: Cannot find wrapper assembly for type library "MSComctlLib".
========== Build: 7 succeeded or up-to-date, 1 failed, 0 skipped ==========

I'm stumped. I haven't changed any project or build settings and I am doubtful that anything major has changed on this machine. I can't find anything useful querying this error so I have no clue what's going on.

Has anyone seen this or know of a fix?

Eastbourne answered 18/10, 2012 at 20:45 Comment(1)
I had the exact same problem today, on VS2015 and windows 10. The answer is still valid. I think its a big shame on microsoft that they can let working solutions fail by doing or not doing an update...Grit
R
14

though there is a small chance that IT has pushed a Windows Update

It isn't small. There were two security updates that patched mscomctl this year. Critical ones too, no IT department would skip them. MS12-027 was released in April, MS12-060 was released in August. Particularly the April update is significant, it changed the guids of the COM server. Which means that the interop library (aka wrapper assembly) is no longer valid.

Remove and re-add the dependency to fix.

Beware you might have some trouble with customers that skip these updates. You really should consider getting rid of the dependency. There's nothing in mscomctl that isn't ably wrapped in the .NET framework, all VB6 controls have good replacements.

Rech answered 22/10, 2012 at 18:9 Comment(0)
I
0

I got this same problem with an application I wrote a couple years ago in VB.net (I think it was the 2017 version of Visual Studio). Unfortunately, it looks like I probably had VB6 installed on the same machine, which is probably why (I'm guessing) there was a reference in my project to the MSComctlLib. I tried re-installing Visual Studio (2008 and VB6 VS) but that did not resolve the issue.

Then I noticed that in the "Solution Explorer" window of Visual Studio (with my solution opened and the errors visible in the Error List) there is a node for "References". When I opened that note I could see all the references including the reference that had the problem (little exclamation mark next to the reference). I was pretty sure my solution did not actually use anything in the MSComctlLib so I decided to:

  1. Close my solution.
  2. Make a backup copy of my solution before making any changes.
  3. Re-open my solution (errors again displayed as expected).
  4. Expanded the Solution Explorer References node.
  5. Right clicked on the offending / erroneous node to get the context menu.
  6. Selected "Remove" from the context menu.

Voila . . . error messages disappeared. I saved my solution. Re-opened the solution. No errors. No problems. Ran the solution. Everything worked properly. Obviously, this only works if your solution doesn't use the MSComctlLib, and mine didn't. So, a quick and easy fix.

Impoverished answered 19/8, 2023 at 13:9 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Hyland

© 2022 - 2024 — McMap. All rights reserved.