Most of the VB.NET windows form standalone projects are developed with MS Access database and SAP Crystal report. To connect VB.NET and MS Access database, Microsoft.Jet.OLEDB.4.0 driver that comes only as a 32-bit version of Windows OS; to make these projects work on 64-bit Windows OS, this project should be either built with the 32-bit mode or set on ‘Prefer 32-bit’.

Whereas Crystal Report runtime engine has both 32-bit and 64-bit modes; when the project is built with 32-bit, it requires the 32-bit Crystal Report runtime engine. Every project that uses MS Access Database and SAP Crystal report reporting system, needs to be compiled in the 32-bit mode.

The best method to make redistributable for these projects is to create ClickOnce setup with setting prerequisites for .NET Framework and Crystal report runtime engine. Using this setup to install software will first download the prerequisites, one of it will be Crystal Report runtime engine. If the target system is 64-bit; the setup will install the 64-bit version of Crystal Report runtime engine; which in turn will not work with software that we install, as the software is compiled in 32-bit mode and it requires the 32-bit Crystal Report runtime engine.

To fix this issue, we need to modify the prerequisites, so as to all prerequisites are installed with the 32-bit version. Prerequisites are stored in a package called the ClickOnce Bootstrapper, every package will have its own configuration file “Product.xml”, we need to edit this file so as to get the 32-bit Version prerequisites are downloaded and installed.

As an example you can find the Crystal Report runtime engine fix as detailed here

  1. Navigate to C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages folder; this folder contains all the prerequisites.
3.PNG
1. Open the folder of the package you want to edit, in this case, open Crystal Reports for .NET Framework 4.0.
2. In this folder you can find the file product.xml, open this file in a text editor.
3. Now find the line

<BypassIf Property=”ProcessorArchitecture” Compare=”ValueNotEqualTo” Value=”Intel”/>

4. Comment this line or replace it with the following

<!–BypassIf Property=”ProcessorArchitecture” Compare=”ValueNotEqualTo” Value=”Intel”/–>

4.PNG
5. Save the file and create the Clickonce setup.

This should have fixed your issue.

If you still face any issues, let me know in the comments section.


Deepak

Deepak

Leave a Replay

About Me

I am a blogger, travel enthusiast and a computer programmar. 

I share some of my personal experiences in this blog. 

Recent Posts

Sign up for our Newsletter

Sign-up here