?
Solved

stdole.dll and .Net 3.5 Framework deployment

Posted on 2009-05-19
8
Medium Priority
?
15,919 Views
Last Modified: 2012-05-07
Using VB.net Express 2008 I've compiled and published a small application, but when I run the setup.exe on WinXP SP3 I got the following error: Unable to install or run the application. The application requires that assembly ADODB Version 7.0.3300.0 be installed in the Global Assembly Cache (GAC) first.

A previous and similar message occured for stdole.dll. I now seem to have ovecome these two messages by going to Project Properties > References, then finding the references to stdole and Microsoft ActiveX Data Objects 2.5, looking in the properties window for both and changing the setting for Copy Local to true. However I'm now getting a different error when the setup tries to deploy adodb.dll, it's a file access error because adodb.dll already exists.

Why so many errors? What should be the correct approach?  I've found copies of these files in C:\Program Files\Microsoft.NET\Primary Interop Assemblies and in C:\WINDOWS\assembly on the development PC but not on the PC where the app is being setup; but both PC's have had the .NET 3.5 update applied.
0
Comment
Question by:ncw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 13

Assisted Solution

by:kaylanreilor
kaylanreilor earned 320 total points
ID: 24428958
I shouldn't have set the copy local property.
I think you'd rather have had used the prerequisites in the publish tab of the properties for the project. Then you should also have hed a setup program.
In the "Prerequisites" dialog box I don't know if "Microsoft Data Access Components 2.8" would make the deal. You're ADODB reference could need the "Visual C++ Runtime Libraries" instead.
On the other hand, since you absolutely need to use this ADO COM, why not having used "Microsoft ActiveX Data Objects 2.8 Library" instead of the 2.5 ?
Also, since you're using .Net Framework, why are you using COM ADO object ?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24429388
You do not copy the stdole.dll. Its a source of many errors when deploying. Instead, add the prerequisite of Office Interop Assemblies to the project so that the stdole.dll could be installed on the target system before your application.
0
 
LVL 1

Author Comment

by:ncw
ID: 24436686
>I shouldn't have set the copy local property.
I've back tracked and set copy local to false.

>why not having used "Microsoft ActiveX Data Objects 2.8 Library" instead of the 2.5 ?
I've now changed the reference to "Microsoft ActiveX Data Objects 2.8 Library"

>since you're using .Net Framework, why are you using COM ADO object ?
I'm using ADO to connect to an MS Access database, should I be using another method?

.NET Framework 3.5 SP1 is already ticked in the pre-requisits, surely that should have downloaded stdole.dll during the install. The .NET Framework did appear to download but I don't think it could have installed correctly; The folder C:\Program Files\Microsoft.NET\Primary Interop Assemblies does not exist on the WinXP I installed on.

I've rebuilt and republished the application but when I run the setup and click install I'm back to getting the first error message: "Unable to install or run the application. The application requires that assembly stdole Version 7.0.3300.0 be installed in the Global Assembly Cache (GAC) first."
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1680 total points
ID: 24438787
>I'm using ADO to connect to an MS Access database, should I be using another method?
You should be using .NET OLEDB provider.

>.NET Framework 3.5 SP1 is already ticked in the pre-requisits, surely that should have downloaded stdole.dll during the install.
Check this link
http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/43398969-4228-41d7-a792-8dd66472b79f/
0
 
LVL 1

Author Comment

by:ncw
ID: 24446440
I'll readup on the .NET OLEDB provider later.

Thanks for the link CodeCruiser. The info on this page doesn't provide a definative answer, different solutions have worked for different people notably:
1. installing the MS Office 2003 PIAs on the target machine -> maybe a workaround but hardly a solution
2. reference a different version of stdole.dll -> my version is correct
3. set publish status for stdole.dll to include instead of pre-requisit -> made no difference for me
4. use gcutil to insert stdole.dll in the destinations GAC -> maybe a workaround but hardly a solution
5. delete the project reference to stdole.dll -> this clears the error for stdole.dll but moves on to a similar error for MySql.Data Version 5.2.5.0, so I changed the publish status for MySql.Data.dll to include instead of pre-requisit and this cleared the error.

So I think #5 has solved the errors on install, however although a program group and shortcut in the start menu are installed, the main exe and associated files have not been installed in Program Files/<app name>, instead they are in Documents & Settings > AccountName > Local Settings > Apps > 2.0 > various sub-folders - is this a temporary location?

When I run the app it says it's missing the ini file.
0
 
LVL 1

Author Closing Comment

by:ncw
ID: 31584190
I've got past the install errors, just don't understand why it's installed deep in Documents and Settings, no doubt there is a path setting in VB.net
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24448412
The reason for the app to be installed deep in the documents and settings is that its installed per user.
0
 
LVL 1

Author Comment

by:ncw
ID: 24448757
I have started a new question at http://www.experts-exchange.com/Programming/Languages/.NET/Q_24429537.html maybe you could help me further please. How would I change this so that it's installed to a specified directory?
0

Featured Post

RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

764 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