An easier way to register the Assemblies' Instrumentation In Enterprise Library
I know that we have a link on the start menu to run the batch file that registers all the assemblies instrumentation, but there is an easier way. The batch file (Install Services.bat) requires that you have VS installed and assumes that you have it installed in the default location (C:\Program Files\…). Actually all you really need is installutil on the path. If it got shipped, in the Common\Instrumentation\Scripts folder, there are two files called Install Instrumentation.cad and UninstallInstrumenation.cad. Now we used this during development to register the assemblies. You could modify this to register your assemblies at deployment time. The parameter you pass to the script is the output directory you built the assemblies to. For example if you built the Debug version of the library, you would run InstallInstrumentation.cmd Debug.
Since I don’t know if you guys have the files. I will post them here:
InstallInstrumentation.cmd
@echo off
echo ==================================================
echo Installing Common Instrumentation
echo ==================================================
installutil ..\..\bin\%1\Microsoft.Practices.EnterpriseLibrary.Common.dll
echo ==================================================
echo Installing Configuration Instrumentation
echo ==================================================
installutil ..\..\bin\%1\Microsoft.Practices.EnterpriseLibrary.Configuration.dll
echo ==================================================
echo Installing Data Instrumentation
echo ==================================================
installutil ..\..\..\Data\bin\%1\Microsoft.Practices.EnterpriseLibrary.Data.dll
echo ==================================================
echo Installing Caching Instrumentation
echo ==================================================
installutil ..\..\..\Caching\bin\%1\Microsoft.Practices.EnterpriseLibrary.Caching.dll
echo ==================================================
echo Installing Logging Instrumentation
echo ==================================================
installutil ..\..\..\Logging\bin\%1\Microsoft.Practices.EnterpriseLibrary.Logging.dll
echo ==================================================
echo Installing Logging Instrumentation Tests
echo ==================================================
installutil ..\..\..\Logging\Sinks\WMISchema\bin\%1\Microsoft.Practices.EnterpriseLibrary.Logging.Sinks.WMISchema.Tests.dll
echo ==================================================
echo Installing ExceptionHandling Instrumentation
echo ==================================================
installutil ..\..\..\ExceptionHandling\bin\%1\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
echo ==================================================
echo Installing Security Instrumentation
echo ==================================================
installutil ..\..\..\Security\bin\%1\Microsoft.Practices.EnterpriseLibrary.Security.dll
echo ==================================================
echo Installing Security Cryptography Instrumentation
echo ==================================================
installutil ..\..\..\Security\Cryptography\bin\%1\Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll
UninstallInstrumenation.cmd
@echo off
echo ==================================================
echo Uninstalling Common Instrumentation
echo ==================================================
installutil /u ..\..\bin\%1\Microsoft.Practices.EnterpriseLibrary.Common.dll
echo ==================================================
echo Uninstalling Configuration Instrumentation
echo ==================================================
installutil /u ..\..\bin\%1\Microsoft.Practices.EnterpriseLibrary.Configuration.dll
echo ==================================================
echo Uninstalling Data Instrumentation
echo ==================================================
installutil /u ..\..\..\Data\bin\%1\Microsoft.Practices.EnterpriseLibrary.Data.dll
echo ==================================================
echo Uninstalling Caching Instrumentation
echo ==================================================
installutil /u ..\..\..\Caching\bin\%1\Microsoft.Practices.EnterpriseLibrary.Caching.dll
echo ==================================================
echo Uninstalling Logging Instrumentation
echo ==================================================
installutil /u ..\..\..\Logging\bin\%1\Microsoft.Practices.EnterpriseLibrary.Logging.dll
echo ==================================================
echo Installing Logging Instrumentation Tests
echo ==================================================
installutil /u ..\..\..\Logging\Sinks\WMISchema\bin\%1\Microsoft.Practices.EnterpriseLibrary.Logging.Sinks.WMISchema.Tests.dll
echo ==================================================
echo Uninstalling ExceptionHandling Instrumentation
echo ==================================================
installutil /u ..\..\..\ExceptionHandling\bin\%1\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
echo ==================================================
echo Uninstalling Security Instrumentation
echo ==================================================
installutil /u ..\..\..\Security\bin\%1\Microsoft.Practices.EnterpriseLibrary.Security.dll
echo ==================================================
echo Uninstalling Security Cryptography Instrumentation
echo ==================================================
installutil /u ..\..\..\Security\Cryptography\bin\%1\Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll
Comments
- Anonymous
March 21, 2005
Thanks! This helped to get Enterprise Library deployed out to a server without VS installed. I just needed to put "C:WINDOWSMicrosoft.NETFrameworkv1.1.4322" in front of the installutil calls to point to the Framework installation folder. The Enterprise Library webcasts were probably the most informative and fun webcasts I've watched and have reduced the time for my company to incorporate the library in some production applications.
Now playing: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playlistId=5457461&selectedItemId=5457439
:) - Anonymous
August 22, 2005
Having used previous Microsoft application blocks I was looking forward to using the new Microsoft Enterprise... - Anonymous
August 29, 2005
Scott Densmore talks about registering the EntLib on a server without needing VS.NET installed. ... - Anonymous
September 02, 2005
Thanks to Scott Densmore blog entry I am able to install enterprise library instrumentation without an... - Anonymous
September 02, 2005
Thanks to Scott Densmore blog entry I am able to install enterprise library instrumentation without an...