Application fails to run while executing the Initialize Component

Posted on 2010-01-05
Last Modified: 2013-11-26
I have C#.Net Windows application, I use a dataset and have done the databinding for the textbox controls in this application.

The application works fine on the development system.

But  fails in the Initialize component procedure, when it was installed on a deployment system. The system has the .Net Framework.

What could be cause for this failure.
Question by:esko_user
    LVL 11

    Expert Comment

    May i know what is the exact error message returned by the server ?
    LVL 14

    Expert Comment

    Do you have extra code in InitializeComponent? Can you paste your InitializeComponent code here..

    Author Comment

    I found this error is due to the crystal report references. I have added the neccesary dll in my installer and now i get the below error..

    System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
    File name: 'CrystalDecisions.ReportAppServer.CommLayer, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
       at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

    I could not get the dll CrystalDecisions.ReportAppServer.CommLayer on my system.

    How can i solve this..?
    LVL 14

    Expert Comment

    Are you using Windows Installer Project ? To which folder have you added the assembly? Try using the Special Folder "Global Assembly Cache Folder"


    Accepted Solution

    I got the solution from the microsoft site,

    We have to first install the CRRedist2008_x86.msi which will configure crystal report runtime components and then install the application.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Flash ( has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now