Application fails to run while executing the Initialize Component

Posted on 2010-01-05
Medium Priority
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
  • 2
  • 2
LVL 11

Expert Comment

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

Expert Comment

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

Author Comment

ID: 26179176
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

ID: 26179300
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

esko_user earned 0 total points
ID: 26179565
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.


Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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…
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

749 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