Deploying Entlib 4.1 to Development server

Sep 24, 2010 at 4:31 PM

I am working on a new development server (Windows server 2003 standard) and I am trying to deploy the Entlib 4.1into the GAC on this server.

Here are the steps I have taken so far:

From my PC, I copied the entire "Bin" folder from C:\Program Files\Microsoft Enterprise Library 4.1 - October 2008\Bin folder

Placed the entire folder into C:\Entlib41\Bin on the server.

I double clicked InstallServices.Bat to perform the install.

When this runs it generates an error on every block. I get the same error on every block, see below.

-----------------------------------------------------------------
Installing Services for the Data Access Application Block
-----------------------------------------------------------------
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Exception occurred while initializing the installation:
System.BadImageFormatException: The format of the file 'Microsoft.Practices.EnterpriseLibrary.Data.dll' is invalid..

 

If anyone can help me out here and let me know what is missing and/or I am doing wrong? I have searched the web and read many different articles but I am not having much luck in solving my issue here.

For now I am just deploying the Entlib DLLs with each ASP.Net application I deploy to the server.

Thanks!

Sep 27, 2010 at 1:13 AM

From what directory are you running the InstallServices.bat file?  I'm not sure if you also copied the one from C:\Program Files\Microsoft Enterprise Library 4.1 - October 2008 directory.  In addition, did you overwrite the assemblies placed in C:\Entlib41\Bin folder or there is another Bin folder with that directory?

Maybe I should ask what is your intent on copying the bin folder to a different location?  Why not simply run the InstallServices.bat file from C:\Program Files\Microsoft Enterprise Library 4.1 - October 2008?

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
   

Sep 27, 2010 at 4:03 PM

I am trying to install the entlib dll's into the GAC of the DEV server so that I don’t have to deploy a copy with each web application I deploy.

So I read that the entlib DLL's in my C:\ProgramFiles\Enterprise library Oct 2008\bin are the "signed" DLL's that I can deploy into the GAC. That is the reason I copied this folder over to the server.

I am running the install services.bat file from the same folder where I copied the DLL's to.

The Enterprise library is NOT installed on the server, therfore there is no C:\ProgramFiles\Enterprise library folder on the server.

 

Sep 28, 2010 at 12:43 AM

Try placing the InstallServices.bat file outside of the bin folder (C:\EntLib41).

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
   

Nov 2, 2010 at 7:30 PM

ok, I did that and it seems to be doing something. I am not getting error messages and it seems to take a minute or two. Listed below is the Install log file for the Security DLL. Did it work? How can I confirm that all the Entlib DLLs are in the GAC now?

Installing assembly 'C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll'.
Affected parameters are:
   logtoconsole = 
   assemblypath = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll
   logfile = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.InstallLog
Installing WMI Schema: Started
Registering assembly: Microsoft.Practices.EnterpriseLibrary.Security_SN_31bf3856ad364e35_Version_4.1.0.0
Ensuring that namespace exists: root\MicrosoftWmiNet
Ensuring that class exists: root\MicrosoftWmiNet:WMINET_Instrumentation
Ensuring that class exists: root\MicrosoftWmiNet:WMINET_InstrumentedNamespaces
Ensuring that class exists: root\MicrosoftWmiNet:WMINET_Naming
Ensuring that namespace exists: root\EnterpriseLibrary
Ensuring that class exists: root\EnterpriseLibrary:WMINET_Instrumentation
Ensuring that class exists: root\EnterpriseLibrary:WMINET_InstrumentedAssembly
Ensuring that class exists: root\EnterpriseLibrary:MSFT_DecoupledProvider
Ensuring that class exists: root\EnterpriseLibrary:WMINET_ManagedAssemblyProvider
Installing WMI Schema: Finished
Creating EventLog source Enterprise Library Security in log Application...
Creating EventLog source Enterprise Library Security in log Application...
Creating performance counter category Enterprise Library Security Counters.
**** WMI schema install start ****
**** WMI schema install start ****
**** WMI schema install end ****
Committing assembly 'C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll'.
Affected parameters are:
   logtoconsole = 
   assemblypath = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll
   logfile = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.InstallLog
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: C:\WINDOWS\system32\wbem\Microsoft.Practices.EnterpriseLibrary.Security_v2.0.50727.mof
MOF file has been successfully parsed
Storing data in the repository...
Done!


Uninstalling assembly 'C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll'.
Affected parameters are:
   logtoconsole = 
   assemblypath = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll
   logfile = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.InstallLog
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: C:\Documents and Settings\AGAJJAR\Local Settings\Temp\2\tmp42.tmp
MOF file has been successfully parsed
Storing data in the repository...
Done!


Removing performance counter category Enterprise Library Security Counters.
Removing EventLog source Enterprise Library Security.
Removing EventLog source Enterprise Library Security.
Warning: The source Enterprise Library Security is not registered on the local machine.
Installing assembly 'C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll'.
Affected parameters are:
   logtoconsole = 
   assemblypath = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll
   logfile = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.InstallLog
Installing WMI Schema: Started
Installing WMI Schema: Finished
Creating EventLog source Enterprise Library Security in log Application...
Creating EventLog source Enterprise Library Security in log Application...
Creating performance counter category Enterprise Library Security Counters.
**** WMI schema install start ****
**** WMI schema install start ****
**** WMI schema install end ****
Committing assembly 'C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll'.
Affected parameters are:
   logtoconsole = 
   assemblypath = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll
   logfile = C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.InstallLog
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: C:\WINDOWS\system32\wbem\Microsoft.Practices.EnterpriseLibrary.Security_v2.0.50727.mof
MOF file has been successfully parsed
Storing data in the repository...
Done!


Nov 3, 2010 at 12:21 AM

Hold on, are you expecting the entlib assemblies to be GAC'ed after running the InstallServices.bat file?  My initial understanding was this was only part of your deplloyment process.  Running that file doesn't install the entlib assemblies in GAC, it installs the enterprise library instrumentation.  In Windows XP, you can simply drag the assemblies to C:\Windows\assembly folder you want to GAC.  For other OS like Vista and Windows 7, you can't simply drag and drop to the assembly folder.   You would need to run the Visual Studio Command promt and make use of the gacutil command.

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com
   

Nov 3, 2010 at 1:37 AM

Yes, I am trying to deploy Entlib 4.1 DLL's onto the GAC of our Development server, which is running Windows Server 2003 (Read my original post). Please let me know how I can install the DLLs into the GAC on this server.

Nov 3, 2010 at 1:58 AM

As I've said, you can use the gacutil command inside the Visual Studio Command prompt.  e.g.

gacutil /i "C:\EntLib4.1\Bin\Microsoft.Practices.EnterpriseLibrary.Security.dll"

To install multiple assemblies, you can create a .txt file in the same directory where your assemblies are and type in all of the name of the assemblies you want to deploy in that .txt file, e.g.

Microsoft.Practices.EnterpriseLibrary.Common.dll

Microsoft.Practices.EnterpriseLibrary.Security.dll

After listing all the assemblies you want to deploy, run this command:

gacutil /il "C:\EntLib4.1\Bin\list.txt"

where list.txt is the name of the text file where the assemblies are listed.

 

Hope this helps.

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com
   

Nov 3, 2010 at 2:04 AM

This is an application server I do not have Visual studio or any such development tools on there. Can I copy the Gacutil.exe over to the server and run it?

Nov 3, 2010 at 2:14 AM

I see.  I'm not an expert on this so try asking this over other forums.  I came across this tool though, you might want to check it out. 

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com