This is a migrated thread and some comments may be shown as answers.

'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory' threw an exception.

2 Answers 1095 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Veteran
Jonathan asked on 03 Jul 2018, 02:13 PM

Hi.. 

Trying to run a report and I'm getting the following error on 

    Flom2K18.Reports.TruckbookReport truckReport = new Flom2K18.Reports.TruckbookReport();

 

Any ideas?   thx!

 

The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory' threw an exception. at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](String id, IConfigurationSource configurationSource) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.Create(String name) at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase(String name) at Flom2K18.Reports.TruckbookReport..ctor() in C:\Flom2K18\Reports\TruckbookReport.cs:line 35System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory..cctor() === Pre-bind state information === LOG: User = JON_ALIENWARE\jon LOG: DisplayName = Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = 

2 Answers, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 04 Jul 2018, 01:48 PM
Hello Jonathan,

It seems that you are using custom types and code inside the TruckbookReport class. Then when the class is instantiated, the custom libraries (Microsoft.Practices.ObjectBuilder2) are not found.

Regards,
Nasko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jonathan
Top achievements
Rank 1
Veteran
answered on 04 Jul 2018, 01:50 PM
thx.. that was the issue
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Veteran
Answers by
Nasko
Telerik team
Jonathan
Top achievements
Rank 1
Veteran
Share this question
or