Could not load file or assembly ‘System.EnterpriseServices.Wrapper.dll’

I had this error when running a .Net 3.5 app that is using a DB2 connector on a Win XP SP3 machine. The application has always worked until today and is in no way using the referenced assembly (just executing some select statements).

The full error reads:

System.IO.FileNotFoundException: Could not load file or assembly ‘System.EnterpriseServices.Wrapper.dll’ or one of its dependencies. The system cannot find the path specified.
File name: ‘System.EnterpriseServices.Wrapper.dll’ —> System.IO.FileNotFoundException: Could not load file or assembly ‘System.EnterpriseServices.Wrapper.dll’ or one of its dependencies. The system cannot find the path specified.
File name: ‘System.EnterpriseServices.Wrapper.dll’ —> System.IO.DirectoryNotFoundException: The system cannot find the path specified. (Exception from HRESULT: 0x80070003)

at System.EnterpriseServices.ContextUtil.get_IsInTransaction()
at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()
at System.Data.Common.ADP.NeedManualEnlistment()
at System.Data.Odbc.OdbcConnection.Open()
at MyFantasticApp.Program.Main(String[] args)

Googling for it recommended to repair the .Net 3.5 SP1 installation.

Result: It is working again!

Advertisement

About Gaston

MCT, MCSD, MCDBA, MCSE, MS Specialist
This entry was posted in .Net, Assembly and tagged , , , . Bookmark the permalink.

2 Responses to Could not load file or assembly ‘System.EnterpriseServices.Wrapper.dll’

  1. Atif Qurashi says:

    Thank You Very Much Dear i Had Same Problem But After Following Your Advice My Machine Is Working Fine 🙂

    Like

  2. dsfgsfg says:

    Excellent. this worked for me.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s