<p>I haven't done a lot of .NET programming, but I've examined a few of the application blocks published by Microsoft's Patterns and Practices group. I was wondering how these are typically used:</p>

<ul>
<li>Linked directly into applications</li>
<li>Source added into applications and built with them, perhaps with some customization's</li>
<li>Sample code used as reference while writing application-specific code</li>
</ul>

<p>I'm sure all three of these usages are common, but what are the most typical usage patterns?</p>

<p>Are there a few particular application blocks that are used by "everyone?"</p>

<p>Note: This question is related to, but not the same as <a href="https://stackoverflow.com/questions/53065/enterprise-library-application-blocks-or-home-grown-framework">Enterprise Library Application Blocks OR Home Grown Framework?</a>.</p>

[{'answer_id': 55441, 'author': 'GEOCHET', 'author_id': 5640, 'author_profile': 'https://Stackoverflow.com/users/5640', 'pm_score': 3, 'selected': True, 'text': "<p>I usually put the source into my project, and then I can get better intellisense (and a better understanding of them). I don't tend to customize them at all though. I like to have them stock so I can just distribute the stock binaries anytime I need them.</p>\n"}, {'answer_id': 55450, 'author': 'Costo', 'author_id': 1130, 'author_profile': 'https://Stackoverflow.com/users/1130', 'pm_score': 2, 'selected': False, 'text': "<p>I've tried several Application Blocks of Enterprise Lib 3.1 (May 2007) and here are some comments :</p>\n\n<p>Caching Application Block : Less interesting than System.Web.Caching in simple scenarios (like In-Memory caching)\nException Handling &amp; Logging : Over-complicated. NLog or Log4Net are better solutions.</p>\n\n<p>I looked at the other Blocks but they didn't seem to fit for our projects.</p>\n\n<p>Finally we completely dropped EntLib because it was painful to customize...\nI would advise you to really consider a less monolithic solution than EntLib.</p>\n"}, {'answer_id': 55454, 'author': 'aku', 'author_id': 1196, 'author_profile': 'https://Stackoverflow.com/users/1196', 'pm_score': 1, 'selected': False, 'text': '<p>I think that most convenient way is to add App blocks\\EntLib as a solution items. That way they will not be recompiled each time you build your project (they will not participate in build process at all) and you can easily access their source code\\set breakpoint etc.</p>\n'}, {'answer_id': 55468, 'author': 'tkrehbiel', 'author_id': 4925, 'author_profile': 'https://Stackoverflow.com/users/4925', 'pm_score': 2, 'selected': False, 'text': '<p>We just put the EntLib 3.1 binaries in the global assembly cache and add references in our projects.  We typically only use the logging framework, though.</p>\n'}, {'answer_id': 342185, 'author': 'Eric', 'author_id': 42461, 'author_profile': 'https://Stackoverflow.com/users/42461', 'pm_score': 2, 'selected': False, 'text': "<p>I have used Microsoft's Enterprise Library extensively. They generally should never be included within your project if possible.  The added cost of compiling can be heavy.  Additionally, there's no reason to have the source code in your project to use the classes.  You will still get intellisence during coding as long as you add a reference to the DLL's in your projects. It is also advisable to avoid having multiple codebases floating around your developer environment. If you need to customize the classes, open them up in their own solution and keep one version active.  Of course I always strongly suggest using version control (VSS or Subversion) in case you need to roll back changes.</p>\n\n<p>There are also open source alternatives to the Microsoft classes that are usually better coded (i.e. Log4Net, nUnit, etc.).  Microsoft code tends to be bloated and inefficient.</p>\n"}, {'answer_id': 1354591, 'author': 'Christian Hayter', 'author_id': 115413, 'author_profile': 'https://Stackoverflow.com/users/115413', 'pm_score': 0, 'selected': False, 'text': '<p>We use the blocks by adding references to the DLLs, making sure that "copy local" is set so that they are deployed with the app into the app\'s bin folder. This means that we don\'t have to muck around with the GAC - much simpler!</p>\n\n<p>When debugging, Visual Studio can still step into the source code even if it\'s not directly included in your project, as long as you have the EntLib source code on your hard disk somewhere. It will prompt you for the location on first use, and remember it thereafter.</p>\n\n<p>We currently use the Caching, Exception and Logging blocks. We haven\'t thought of a use case for the rest yet.</p>\n'}]
['https://Stackoverflow.com/questions/55437', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1175/']