VB.net 2010 Ultimate error comctl32.dll missing as reference.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have been using the VB IDE for many months on a VB6 translation to vb.net 2010. I have had no troubles building and running in debug,until the message below just appeared. This now prevents me from running in debug. I have not used Publish in
the Build menu or used ClickOnce.
The Project - application page has "enable XP visual styles" checked. I do not want this unchecked, which will remove the error message below.
The error message is:<span>


Error 2 Could not find file Microsoft.Windows.Common-Controls, Version=6.0.0.0, Culture=*, PublicKeyToken=6595b64144ccf1df, ProcessorArchitecture=*, Type=win32.
<span>This refers to file comctl32.dll, a copy of which is now in the project directory. I have been unable to add a reference to it in the References page, using browse, the message being:
"A reference to comctl32.dll could not be added. Please make sure that it is a valid assembly or com component"
The error list states "Could not find file Microsoft.Windows.CommonControls, Version 6.0.0.0, Culture= *, PublicKeyToken=6595b64144ccf1df, ProcessorArchitecture=*, Type=win32.
This version and PublicKeyToken etc comes from the app.manifest <span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small "<<span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small <span style="font-family:Consolas; color:#a31515; font-size:x-small assemblyIdentity"<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small

<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small I am running under Windows 7 64 bit. I have changed
the compile/advanced Compiler settings from anyCPU to x86, without effect. Platform remains at active(any CPU), unchangeable.
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small App.manifest enclosed.
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small
<div style="color:Black;background-color:White; <pre>
<?xml version=<span style="color:#A31515; "1.0" encoding=<span style="color:#A31515; "utf-8"?>
<asmv1:<span style="color:Blue; assembly manifestVersion=<span style="color:#A31515; "1.0" xmlns=<span style="color:#A31515; "urn:schemas-microsoft-com:asm.v1" xmlns:asmv1=<span style="color:#A31515; "urn:schemas-microsoft-com:asm.v1" xmlns:asmv2=<span style="color:#A31515; "urn:schemas-microsoft-com:asm.v2" xmlns:xsi=<span style="color:#A31515; "http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version=<span style="color:#A31515; "5.0.0.0" name=<span style="color:#A31515; "AffinityN" />
<trustInfo xmlns=<span style="color:#A31515; "urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns=<span style="color:#A31515; "urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
<span style="color:Blue; If you want <span style="color:Blue; to change the Windows User Account Control level replace the
requestedExecutionLevel node <span style="color:Blue; with one of the following.

<!requestedExecutionLevel level=<span style="color:#A31515; "asInvoker" uiAccess=<span style="color:#A31515; "false" />
<!requestedExecutionLevel level=<span style="color:#A31515; "requireAdministrator" uiAccess=<span style="color:#A31515; "false" />
<!requestedExecutionLevel level=<span style="color:#A31515; "highestAvailable" uiAccess=<span style="color:#A31515; "false" />

Specifying requestedExecutionLevel node will disable file <span style="color:Blue; and registry virtualization.
<span style="color:Blue; If you want <span style="color:Blue; to utilize File <span style="color:Blue; and Registry Virtualization <span style="color:Blue; for backward
compatibility <span style="color:Blue; then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level=<span style="color:#A31515; "asInvoker" uiAccess=<span style="color:#A31515; "false" />
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet Unrestricted=<span style="color:#A31515; "true" ID=<span style="color:#A31515; "Custom" SameSite=<span style="color:#A31515; "site" />
<defaultAssemblyRequest permissionSetReference=<span style="color:#A31515; "Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns=<span style="color:#A31515; "urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of <span style="color:Blue; all Windows versions that this application <span style="color:Blue; is designed <span style="color:Blue; to work <span style="color:Blue; with. Windows will automatically <span style="color:Blue; select the most compatible environment.-->
<!-- <span style="color:Blue; If your application <span style="color:Blue; is designed <span style="color:Blue; to work <span style="color:Blue; with Windows 7, uncomment the following supportedOS node-->
<supportedOS Id=<span style="color:#A31515; "{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />--&gt;
</application>
</compatibility>
<!-- Enable themes <span style="color:Blue; for Windows common controls <span style="color:Blue; and dialogs (Windows XP <span style="color:Blue; and later) -->
<dependency>
<dependentAssembly>
<assemblyIdentity type=<span style="color:#A31515; "win32" name=<span style="color:#A31515; "Microsoft.Windows.Common-Controls" version=<span style="color:#A31515; "6.0.0.0" processorArchitecture=<span style="color:#A31515; "*" publicKeyToken=<span style="color:#A31515; "6595b64144ccf1df" language=<span style="color:#A31515; "*" />
</dependentAssembly>
</dependency>--&gt;

</asmv1:<span style="color:Blue; assembly>
[/code]

<span style="font-family:Consolas; color:#0000ff; font-size:x-small <font face="Consolas" size="2" color="#0000ff" style="font-family:Consolas; color:#0000ff; font-size:x-small

</font>

<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<hr class="sig David W. Macpherson

View the full article
 
Back
Top