Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0.
We are publishing the DEV code in a new server. We updated the Visual studio version from 2013 to 2019. While debugging the code, we are getting the following error. should we update .dll or assembly version as well? Please help me solve the issue ASAP. Let me know if you need any further information regarding this error.
Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.InnerCreateDatabase(String name)
at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase(String name)
at DssBicWcf.Logic.Credentials.CredentialsLogic.GetEmployeeId(ClientCredentials& credentials) in C:\Users\Kur111545-a\source\Workspaces\BV Finance - DSS BIC\BIC Web\DEV\DssBicWcf\DssBicWcf\Logic\Credentials\CredentialsLogic.cs:line 44
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/Kur111545-a/source/Workspaces/BV Finance - DSS BIC/BIC Web/DEV/DssBicWcf/DssBicWcf/
LOG: Initial PrivatePath = C:\Users\Kur111545-a\source\Workspaces\BV Finance - DSS BIC\BIC Web\DEV\DssBicWcf\DssBicWcf\bin
Calling assembly : Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Kur111545-a\source\Workspaces\BV Finance - DSS BIC\BIC Web\DEV\DssBicWcf\DssBicWcf\web.config
LOG: Using host configuration file: C:\Users\Kur111545-a\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/b477b6ba/7b515931/Microsoft.Practices.ServiceLocation.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/b477b6ba/7b515931/Microsoft.Practices.ServiceLocation/Microsoft.Practices.ServiceLocation.DLL.
LOG: Attempting download of new URL file:///C:/Users/Kur111545-a/source/Workspaces/BV Finance - DSS BIC/BIC Web/DEV/DssBicWcf/DssBicWcf/bin/Microsoft.Practices.ServiceLocation.DLL.
LOG: Attempting download of new URL file:///C:/Users/Kur111545-a/source/Workspaces/BV Finance - DSS BIC/BIC Web/DEV/DssBicWcf/DssBicWcf/bin/Microsoft.Practices.ServiceLocation/Microsoft.Practices.ServiceLocation.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/b477b6ba/7b515931/Microsoft.Practices.ServiceLocation.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/b477b6ba/7b515931/Microsoft.Practices.ServiceLocation/Microsoft.Practices.ServiceLocation.EXE.
LOG: Attempting download of new URL file:///C:/Users/Kur111545-a/source/Workspaces/BV Finance - DSS BIC/BIC Web/DEV/DssBicWcf/DssBicWcf/bin/Microsoft.Practices.ServiceLocation.EXE.
LOG: Attempting download of new URL file:///C:/Users/Kur111545-a/source/Workspaces/BV Finance - DSS BIC/BIC Web/DEV/DssBicWcf/DssBicWcf/bin/Microsoft.Practices.ServiceLocation/Microsoft.Practices.ServiceLocation.EXE.
Microsoft.Practices.EnterpriseLibrary.Data
Microsoft.Practices.EnterpriseLibrary.Data.Database InnerCreateDatabase(System.String)