Solved

Failed to Load Control. Version might be outdated.

Posted on 2010-09-12
8
1,261 Views
Last Modified: 2012-05-10
I'm developing a desktop application using VB6

I've got a Standard EXE project, with a couple of forms and a couple of user controls in the one project.
When I compile it, the user controls are supposed to compile as one exe.

When I execute the exe on my pc, it is working, but on another pc I get the following error :

"Failed to load control 'UCButtonSmall' from .  Your version may be outdated.  Make sure you are using the version of the control that was provided with your application."

As far as I can see, the user control's properties are the same as all the other controls that are working.

I have uninstalled, reboot, re-install, recompile, but nothing!
0
Comment
Question by:koossa
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 8

Expert Comment

by:Yiogi
ID: 33658479
Check if you have a different version in your GAC (%windir%\assembly). There should also be an option in your project when you select the reference to the control "Use Specific Version". Set it to false.
0
 
LVL 7

Expert Comment

by:jaynee
ID: 33658555
Just a basic check - you have done an install on the second workstations, not just copied across the exe?
0
 
LVL 8

Expert Comment

by:Yiogi
ID: 33658945
Oh I didn't read the post well I suppose. I didn't notice it wouldn't work on another pc. Are you sure you copied all the dlls needed on the second computer? And as in my original post check the GAC. It might be that you have the dll there and that's why it works on yours and not on the second pc.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:koossa
ID: 33659522
Please note, this is a usercontrol that was added to the project, it does not compile into a separate dll, it's compiled into the project exe.

There is nothing in %windir%\assembly
I don't see the "Use Specific Version", because the usercontrol is part of the exe, it is not in references or components.

I have build an install, but the install only copies the exe to the correct location and create a shortcut on the desktop.

The other vb retaled dlls are already on the machine.


0
 

Author Comment

by:koossa
ID: 33659529
When I run depends.exe on my exe, all the dlls are there without a problem.
0
 
LVL 7

Expert Comment

by:jaynee
ID: 33659581
When you added the user control to the project, what file did you make reference to, in order to get it in? An OCX? OCA? DLL? That file is probably what should be distributed as part of your install, and registered with the target machine.
0
 

Author Comment

by:koossa
ID: 33659613
Create an new standard exe, now go to project, select add new user control.
When you compile the project the user control will be compiled into the exe.

When I open the .vbp file with notepad it reference to

..\Common\ActiveX\buttons\UCButtonSmall.ctl

So it is not referenced to a dll, ocx or oca file, but a ctl!
0
 
LVL 6

Accepted Solution

by:
judgeking earned 500 total points
ID: 33666947
I've had this problem too, the new PC doesn't have all the files your project or CTL file requires.

Sounds like you need to just build an installer package.  Do you have Visual Studio 2000 or greater?  If not, do you have Visual Studio Installer?  MS has removed the download from their website (it's a little old now, but so is VB6, right?), but you can still download it at the Webarchive at:

http://web.archive.org/web/20080513102621/http://msdn.microsoft.com/en-us/vstudio/aa718352.aspx
- download setup1.exe and setup2.exe

Create a new VB Installer project, and import your VB6 project from Project>Add VB Project Outputs.  It will pull in all the files your app references and build an installer package (MSI file).  It's a good tool, you can create shortcuts where you want, control install dialog boxes, etc.

Let me know if you have any problems.
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show/Hide ASP.NET controls with JQuery best practices 3 49
VB.Net Report Printing Issue 3 34
VB.NET 1 22
get row value in vb.net 4 14
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question