<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Michael Freidgeim's Blog</title>
        <link>http://geekswithblogs.net/mnf/Default.aspx</link>
        <description>MS .Net Development</description>
        <language>en-AU</language>
        <copyright>Michael Freidgeim</copyright>
        <managingEditor>Michael.Freidgeim@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Michael Freidgeim's Blog</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/mnf/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Override ToString() using Json serialization or something else.</title>
            <category>Testing/Debugging/Logging</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/05/04/override-tostring-using-json-serialization-or-something-else.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/05/04/override-tostring-using-json-serialization-or-something-else.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/05/04/override-tostring-using-json-serialization-or-something-else.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;When creating a new data class, it’s a good idea to override&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ToString() method to output most of the data.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;It will help to see details in logs.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;The only exception if the class has a sensitive data like CreditCard number or password.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;For DataContract classes just use&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;override&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ToString()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//Use JSON as the simplest serializer&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sRet =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;this&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.ToExtJsJsonItem();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;return&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sRet;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div align="left"&gt;&lt;div align="left"&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Sometimes it is useful to create extensions to standard .Net classes.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;E.g. In CookieHelper class I've created&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;  &lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;static&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ToJsonString(&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;this&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;HttpCookie&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;httpCookie)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;        {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;           &lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sRet = httpCookie.ToExtJsJsonItem();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;           &lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;return&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sRet;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;        }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;The actual extension we are using was written by&lt;span&gt; &lt;/span&gt;&lt;a href="https://github.com/dimarzionist"&gt;Nikita Pinchuk&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;      &lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;static&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ToExtJsJsonItem(&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;this&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;object&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;item)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;        {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;           &lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;DataContractJsonSerializer&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;serializer =&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;DataContractJsonSerializer&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(item.GetType());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;           &lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;MemoryStream&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ms =&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;MemoryStream&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;())&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;            {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                serializer.WriteObject(ms, item);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;               &lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;StringBuilder&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sb =&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;StringBuilder&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                sb.Append(&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Encoding&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.UTF8.GetString(ms.ToArray()));&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;               &lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;return&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sb.ToString();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;            }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;        }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;For non DataContract classes the extension method may not work-i&lt;/span&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;t could cause an error: &lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;span style="font-size: 9pt; background-color: rgb(230, 231, 232);"&gt;&lt;font color="#e30000"&gt;A first chance exception of type 'System.Runtime.Serialization.InvalidDataContractException' occurred in System.Runtime.Serialization.dll&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;In this case you can try  &lt;a href="http://json.net/"&gt;JSON.NET&lt;/a&gt;&lt;span&gt; &lt;/span&gt;or the JsonValue types (nuget package JsonValue).&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Helvetica"&gt;&lt;span style="font-size: 14px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;Sometimes I am using&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; &lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;sRet =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;this&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.XmlSerializeSafe();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;But it is also not working for all types, e.g. &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;&lt;div align="left"&gt;&lt;div align="left"&gt;&lt;font color="#e30000"&gt;MyClass cannot be serialized because it does not have a parameterless constructor.&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;In some places we are using LinqPad's D&lt;a href="http://geekswithblogs.net/mnf/archive/2012/04/14/dump-an-arbitrary-object-to-html-string.aspx"&gt;ump an arbitrary object To Html String&lt;/a&gt;, but we found it is too heavy for logs, plain text is easier to read than HTML.&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;I haven't tried yet &lt;strong&gt;ServiceStack.Text&lt;/strong&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&lt;a href="http://www.servicestack.net/mythz_blog/?p=202"&gt;C# .NET Extension method: T.Dump()&lt;/a&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152856.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/05/04/override-tostring-using-json-serialization-or-something-else.aspx</guid>
            <pubDate>Sat, 04 May 2013 03:18:30 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152856.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/05/04/override-tostring-using-json-serialization-or-something-else.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152856.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152856.aspx</trackback:ping>
        </item>
        <item>
            <title>Deploy PDB files into production to ease exception report investigation.</title>
            <category>Testing/Debugging/Logging</category>
            <category>Deployment</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/05/04/deploy-pdb-files-into-production-to-ease-exception-report-investigation.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/05/04/deploy-pdb-files-into-production-to-ease-exception-report-investigation.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/05/04/deploy-pdb-files-into-production-to-ease-exception-report-investigation.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; &lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt; For a long time I believed that PDB as a part of debugging information should not be included in production deployment. &lt;span style="background-color: transparent;"&gt;Recently my colleague suggested to copy them to simplify exception investigations. &lt;/span&gt;&lt;/p&gt;&lt;div style="margin: 0px 5px 5px 0px; padding: 0px; border: 0px currentColor; width: 660px; height: 109px; vertical-align: baseline;"&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt; &lt;/p&gt;&lt;div style="margin: 0px 5px 5px 0px; padding: 0px; border: 0px currentColor; width: 660px; vertical-align: baseline;"&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;&lt;span style="background-color: transparent;"&gt;The following  SO discussion&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent;"&gt;convinced us that it is a good idea  ( at least for web sites).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;&lt;span style="background-color: transparent;"&gt; &lt;/span&gt;&lt;a style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap; background-color: transparent;" href="http://stackoverflow.com/questions/933883/are-there-any-security-issues-leaving-the-pdb-debug-files-on-the-live-servers"&gt;http://stackoverflow.com/questions/933883/are-there-any-security-issues-leaving-the-pdb-debug-files-on-the-live-servers&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin: 0px 5px 5px 0px; padding: 0px; border: 0px currentColor; width: 660px; vertical-align: baseline;"&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;&lt;span style="background-color: transparent;"&gt;    These files will not be exposed to the public if kept in the right places (website\bin). &lt;/span&gt;&lt;/p&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: transparent;"&gt; So we decided to deploy the PDBs into production&lt;/span&gt;&lt;span style="background-color: transparent;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: transparent;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="background-color: transparent;"&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;&lt;span style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap;"&gt;BTW, if you include PDBs with your deployments, you don't need to store them in a symbol server,&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;&lt;span style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap;"&gt; as it is suggested in &lt;/span&gt;&lt;a style="font-family: Helvetica; white-space: pre-line;" href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx"&gt;http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;However we found that  PDBs   were generated not for all DLLs.  After some analysis we believe that MS changed default settings starting from VS 2008 (or may be since VS 2005) and make generation of &lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;PDB-only even for release mode. This is why older projects had &lt;/span&gt;generation of &lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;PDBs disabled.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; text-align: left; line-height: 18px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; vertical-align: baseline; word-wrap: break-word; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;To change setting in Visual Studio there is an option in the "Project Properties", "Build", "Advanced...".&lt;/p&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; text-align: left; line-height: 18px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; vertical-align: baseline; word-wrap: break-word; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;Change "Debug Info:" to PDB-only.&lt;/p&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; text-align: left; line-height: 18px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; vertical-align: baseline; word-wrap: break-word; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;span style="margin: 0px; padding: 0px; border: 0px currentColor; color: rgb(64, 90, 4); vertical-align: baseline; background-color: rgb(209, 225, 173);"&gt;The screenshots are available in the post&lt;/span&gt;&lt;span style="margin: 0px; padding: 0px; border: 0px currentColor; color: rgb(64, 90, 4); text-decoration: none; vertical-align: baseline; cursor: pointer; background-color: rgb(209, 225, 173);"&gt;&lt;a style="margin: 0px; padding: 0px; border: 0px currentColor; color: rgb(74, 107, 130); text-decoration: none; vertical-align: baseline; cursor: pointer; background-color: transparent;" href="http://callicode.com/Homeltpagegt/tabid/38/EntryId/24/How-to-disable-pdb-generation-in-Visual-Studio-2008.aspx" rel="nofollow"&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap;"&gt;&lt;a href="http://callicode.com/Homeltpagegt/tabid/38/EntryId/24/How-to-disable-pdb-generation-in-Visual-Studio-2008.aspx"&gt;http://callicode.com/Homeltpagegt/tabid/38/EntryId/24/How-to-disable-pdb-generation-in-Visual-Studio-2008.aspx&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; clear: both; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt; &lt;/p&gt;&lt;/div&gt;&lt;div&gt;
Related links:&lt;/div&gt;&lt;div&gt;The article &lt;span style="padding-left: 8px; font-size: 12px;"&gt;&lt;a href="http://blog.vuscode.com/malovicn/archive/2007/08/05/releasing-the-build.aspx"&gt;http://blog.vuscode.com/malovicn/archive/2007/08/05/releasing-the-build.aspx&lt;/a&gt; compares different options for debug and release and confirms that in 2007 &lt;/span&gt;&lt;span style="background-color: transparent;"&gt;pdbonly was the default for &lt;/span&gt;&lt;span style="background-color: transparent;"&gt;release configuration of visual studio&lt;/span&gt;   
              &lt;/div&gt;&lt;blockquote style="margin-right: 0px;" dir="ltr"&gt;&lt;p style="list-style: circle; margin: 0px 0px 4px; padding: 0px; outline: 0px; border: 0px currentColor; vertical-align: baseline; background-color: transparent;"&gt;/optimize+ /debug:pdbonly (release configuration of visual studio)&lt;/p&gt;&lt;/blockquote&gt;&lt;div&gt;The article &lt;span style="font-family: Helvetica; background-color: rgb(251, 251, 251);"&gt;&lt;a href="http://blog.deltacode.be/2012/09/26/include-pdb-files-in-web-application-publish-for-release-mode-vs2012/"&gt;Include .pdb files in Web Application Publish for Release mode (VS2012)&lt;/a&gt;&lt;span style="font-size: 18px;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Helvetica; font-size: 12px; white-space: pre-line; background-color: rgb(251, 251, 251);"&gt; wasn't applicable for us, but may be useful for someone else.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152855.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/05/04/deploy-pdb-files-into-production-to-ease-exception-report-investigation.aspx</guid>
            <pubDate>Sat, 04 May 2013 03:03:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152855.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/05/04/deploy-pdb-files-into-production-to-ease-exception-report-investigation.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152855.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152855.aspx</trackback:ping>
        </item>
        <item>
            <title>Default Enum initialisation by MS Create Unit Tests wizard.</title>
            <category>Testing/Debugging/Logging</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/03/16/default-enum-initialisation-by-ms-create-unit-tests-wizard.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/03/16/default-enum-initialisation-by-ms-create-unit-tests-wizard.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/03/16/default-enum-initialisation-by-ms-create-unit-tests-wizard.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;VS 2012 doesn't show Create Unit Tests wizard. However it can be used - see &lt;/div&gt;&lt;h1 style="margin: 0px 0px 7px; padding: 0px; border: 0px currentColor; text-align: left; color: rgb(0, 0, 0); text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; font-family: &amp;quot;Trebuchet MS&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-style: normal; font-variant: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;font size="3" style="margin: 0px; padding: 0px; border: 0px currentColor; font-weight: normal; vertical-align: baseline; cursor: pointer; background-color: transparent;"&gt;&lt;font color="#2d4fc9"&gt;&lt;a style="margin: 0px; padding: 0px; border: 0px currentColor; vertical-align: baseline; cursor: pointer; background-color: transparent;" href="http://stackoverflow.com/questions/9547055/where-is-the-create-unit-tests-selection"&gt;Where is the “Create Unit Tests” selection?&lt;/a&gt; &lt;/font&gt; &lt;/font&gt;&lt;font size="3" style="font-weight: normal;"&gt;and&lt;/font&gt;&lt;/h1&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="line-height: 21px; font-family: Helvetica; font-size: 17px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;a href="http://dl.my/2013/create-unit-tests-function-not-available-or-disabled/"&gt;http://dl.my/2013/create-unit-tests-function-not-available-or-disabled/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;I've found the Wizard creates quite funny default for enumerator- to use constructor.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;PaymentType&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;paymentType =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;PaymentType&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#00008b" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;TODO: Initialize to an appropriate value&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#00008b" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#00008b" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;I would prefer t have first/default enum value, e.g. &lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#00008b" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;PaymentType&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;paymentType =&lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;PaymentType.None&lt;/span&gt;&lt;/font&gt; &lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#00008b" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#00008b" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;I should suggest it to ALM Rangers, who started a new test generation project&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152430.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/03/16/default-enum-initialisation-by-ms-create-unit-tests-wizard.aspx</guid>
            <pubDate>Sat, 16 Mar 2013 02:00:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152430.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/03/16/default-enum-initialisation-by-ms-create-unit-tests-wizard.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152430.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152430.aspx</trackback:ping>
        </item>
        <item>
            <title>WCF Transactions are not supported by Azure.</title>
            <category>Web Services/WCF</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/03/16/wcf-transactions-are-not-supported-by-azure.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/03/16/wcf-transactions-are-not-supported-by-azure.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/03/16/wcf-transactions-are-not-supported-by-azure.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; margin-top: 8px; margin-bottom: 8px; word-spacing: 0px; white-space: pre-line; word-wrap: break-word; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span&gt;We have a service operation, for which it is very important to ensure that a client receives the status, that was determined at the end of operation.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;If client does receive the response, the server status should be "completed". Otherwise (in case of communication error), server status should be rollback and stay as "pending". The possible technical solutions were discussed and WCF Transactions support with  2PC(two phase commit) was selected.  &lt;/span&gt;We implemented service operation with transaction commit/rollback support and asked our clients to use it.&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Our main client is running on Azure. It was a big disappointment, when Readify consultant H&lt;a style="white-space: pre-line;" href="http://himanshudesai.wordpress.com/"&gt;imanshu Desai&lt;/a&gt;  adviced that WCF Transactions are not supported by Azure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;I did a quick check on Internet and didn't find that is well known issue.&lt;/div&gt;&lt;div&gt;Below are a few quotes to describe the limitation:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span&gt;2PC in the cloud is hard for&lt;span&gt; &lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;a style="font: bold 16px/normal verdana, arial, sans-serif; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; text-decoration: none; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875);" href="http://vasters.com/clemensv/ct.ashx?id=e79915fe-825c-4855-ae7c-0ad01f479238&amp;amp;url=http%3a%2f%2fblogs.msdn.com%2fb%2fclemensv%2farchive%2f2011%2f10%2f06%2fachieving-transactional-behavior-with-messaging.aspx"&gt;all sorts of reasons&lt;/a&gt;&lt;span&gt;. 2PC as implemented by DTC effectively depends on the coordinator and its log and connectivity to the coordinator to be very highly available. It also depends on all parties cooperating on a positive outcome in an expedient fashion. To that end, you need to&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;a style="font: bold 16px/normal verdana, arial, sans-serif; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; text-decoration: none; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875);" href="http://vasters.com/clemensv/ct.ashx?id=e79915fe-825c-4855-ae7c-0ad01f479238&amp;amp;url=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fcc730992(WS.10).aspx"&gt;run DTC in a failover cluster&lt;/a&gt;&lt;span&gt;, because it’s the Achilles heel of the whole system and any transaction depends on DTC clearing it.&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;The bottom line is that Service Bus, specifically with its de-duplication features for sending and with its reliable delivery support using Peek-Lock (which we didn’t discuss in the thread, but see&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;a style="color: rgb(0, 0, 0); font-family: verdana, arial, sans-serif; font-size: 16px; font-weight: bold; text-decoration: none; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);" href="http://vasters.com/clemensv/ct.ashx?id=e79915fe-825c-4855-ae7c-0ad01f479238&amp;amp;url=http://msdn.microsoft.com/en-us/library/windowsazure/hh851750.aspx"&gt;here&lt;/a&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;span&gt; &lt;/span&gt;and also&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;a style="color: rgb(0, 0, 0); font-family: verdana, arial, sans-serif; font-size: 16px; font-weight: bold; text-decoration: none; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);" href="http://vasters.com/clemensv/ct.ashx?id=e79915fe-825c-4855-ae7c-0ad01f479238&amp;amp;url=http://geekswithblogs.net/asmith/archive/2012/04/02/149176.aspx"&gt;here&lt;/a&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;) is a great tool to compensate for the lack of coordinator support in the cloud&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;span style="font-family: Helvetica; font-size: 14px; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;The Azure storage folks&lt;span&gt; &lt;/span&gt;&lt;a href="http://vasters.com/clemensv/ct.ashx?id=e79915fe-825c-4855-ae7c-0ad01f479238&amp;amp;url=http%3a%2f%2fsigops.org%2fsosp%2fsosp11%2fcurrent%2f2011-Cascais%2f11-calder-online.pdf"&gt;implement their clusters in a very particular way&lt;/a&gt;&lt;span&gt; &lt;/span&gt;to provide highly-scalable, highly-available, and strongly consistent storage – and they are using a quorum based protocol (&lt;a href="http://vasters.com/clemensv/ct.ashx?id=e79915fe-825c-4855-ae7c-0ad01f479238&amp;amp;url=http%3a%2f%2fen.wikipedia.org%2fwiki%2fPaxos_algorithm"&gt;Paxos&lt;/a&gt;) rather than classic atomic TX protocol to reach consensus. &lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div style="margin: 8px 0px; padding: 0px; font-family: Helvetica; white-space: pre-line; word-wrap: break-word; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;span style="padding: 4px; border-radius: 6px; color: rgb(255, 255, 255); font-size: 12px; background-color: rgb(153, 153, 153);"&gt;URL&lt;/span&gt;&lt;a style="text-align: left; color: rgb(0, 0, 0); line-height: 33px; font-family: &amp;quot;trebuchet ms&amp;quot;, Arial, Helvetica, serif; background-color: rgb(255, 255, 255);" href="http://vasters.com/clemensv/2012/07/30/Transactions+In+Windows+Azure+With+Service+Bus+Ndash+An+Email+Discussion.aspx" rel="bookmark"&gt;Transactions in Windows Azure (with Service Bus) – An Email Discussion&lt;/a&gt;&lt;span style="font-size: 14px;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div&gt;&lt;p&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size: 14pt;"&gt;In the current release, only one top level messaging entity, such as a queue or topic can participate in a transaction, and the transaction cannot include any other transaction resource managers, making transactions spanning a messaging entity and a database not possible.&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div style="margin: 8px 0px; padding: 0px; font-family: Helvetica; white-space: pre-line; word-wrap: break-word; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;span style="padding: 4px; border-radius: 6px; color: rgb(255, 255, 255); font-size: 12px; background-color: rgb(153, 153, 153);"&gt;URL&lt;/span&gt;&lt;span style="padding-left: 8px; font-size: 12px;"&gt;&lt;a href="http://geekswithblogs.net/asmith/archive/2012/04/02/149176.aspx"&gt;http://geekswithblogs.net/asmith/archive/2012/04/02/149176.aspx&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div style="margin: 8px 0px; padding: 0px; font-family: Helvetica; white-space: pre-line; word-wrap: break-word; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;span style="font-family: Tahoma; background-color: rgba(255, 255, 255, 0);"&gt;Has Windows Azure any kind of distributed transaction mechanism in order to include any remote object creation in an atomic transaction including other domain-specific operations?  &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div style="margin: 8px 0px; padding: 0px; word-wrap: break-word; background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div style="white-space: pre-line;"&gt;&lt;div style="font-family: Tahoma; margin-top: 8px; margin-bottom: 8px; word-wrap: break-word;"&gt;&lt;span style="padding: 4px; border-radius: 6px; color: rgb(255, 255, 255); font-size: 12px; background-color: rgb(153, 153, 153);"&gt;URL&lt;/span&gt;&lt;span style="padding-left: 8px; font-size: 12px;"&gt;&lt;a href="http://stackoverflow.com/questions/13469870/atomicity-database-transaction-and-windows-azure"&gt;http://stackoverflow.com/questions/13469870/atomicity-database-transaction-and-windows-azure&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Tahoma; margin-top: 8px; margin-bottom: 8px; word-wrap: break-word;"&gt;&lt;div style="white-space: pre-line;"&gt;&lt;font size="4"&gt;The alternative solution suggested by &lt;span style="white-space: normal;"&gt;H&lt;/span&gt;&lt;/font&gt;&lt;a href="http://himanshudesai.wordpress.com/"&gt;&lt;font size="4"&gt;imanshu Desai&lt;/font&gt;&lt;/a&gt;&lt;font size="4"&gt; is to have an operation to start a process on the server and then poll in a loop on a client until final status is received from the server.&lt;/font&gt; &lt;/div&gt;&lt;span style="white-space: pre-line;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152429.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/03/16/wcf-transactions-are-not-supported-by-azure.aspx</guid>
            <pubDate>Sat, 16 Mar 2013 01:43:41 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152429.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/03/16/wcf-transactions-are-not-supported-by-azure.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152429.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152429.aspx</trackback:ping>
        </item>
        <item>
            <title>2010 version of TF (TFS command tool) unable to determine the workspace that is working with Vs 2012 and TFS 2012</title>
            <category>Visual Studio/TFS</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/03/16/2010-version-of-tf-tfs-command-tool-unable-to-determine.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/03/16/2010-version-of-tf-tfs-command-tool-unable-to-determine.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/03/16/2010-version-of-tf-tfs-command-tool-unable-to-determine.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;We upgraded to VS 2012 and TFS 2012 a month ago.&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;I have a backupShelve.cmd that used to work before upgrade, but when I run it yesterday caused the error&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt; &lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;The backupShelve.cmd file is the following &lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="margin-right: 0px;" dir="ltr"&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86&lt;br /&gt;
tf shelve   /replace /comment:"Current backup" CurrentBackupMT01 /noprompt&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;pause&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;
After some time I've noticed, that batch file refers to version 10 folder instead of "Microsoft Visual Studio 11".&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;After I've changed folder name, TF started to work.&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152428.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/03/16/2010-version-of-tf-tfs-command-tool-unable-to-determine.aspx</guid>
            <pubDate>Sat, 16 Mar 2013 01:27:41 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152428.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/03/16/2010-version-of-tf-tfs-command-tool-unable-to-determine.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152428.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152428.aspx</trackback:ping>
        </item>
        <item>
            <title>EntLIb editor corrupts config files</title>
            <category>Testing/Debugging/Logging</category>
            <category>.Net Framework</category>
            <category>.Net Framework</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/02/16/entlib-editor-corrupts-config-files.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/02/16/entlib-editor-corrupts-config-files.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/02/16/entlib-editor-corrupts-config-files.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;I've tried to use &lt;font face="Consolas"&gt;Microsoft Enterprise Library(&lt;/font&gt;EntLIb) editor, as it was suggested in &lt;/span&gt;&lt;a style="font:/normal Tahoma; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" href="http://weblogs.asp.net/sukumarraju/archive/2011/11/07/configuring-wcf-service-to-utilise-enterprise-library-logging-application-to-log-data-to-database.aspx"&gt;http://weblogs.asp.net/sukumarraju/archive/2011/11/07/configuring-wcf-service-to-utilise-enterprise-library-logging-application-to-log-data-to-database.aspx&lt;/a&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;, but after changes all comments in config files were removed.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;Always consider to move any &lt;/span&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;Enterprise&lt;/span&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; Library configurations to a separate file before editing.&lt;/span&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152122.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/02/16/entlib-editor-corrupts-config-files.aspx</guid>
            <pubDate>Sat, 16 Feb 2013 04:45:49 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152122.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/02/16/entlib-editor-corrupts-config-files.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152122.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152122.aspx</trackback:ping>
        </item>
        <item>
            <title>Static methods not always bad for testability</title>
            <category>Testing/Debugging/Logging</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/02/16/static-methods-not-always-bad-for-testability.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/02/16/static-methods-not-always-bad-for-testability.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/02/16/static-methods-not-always-bad-for-testability.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;Some time ago I've posted a few links about &lt;img width="1" height="1" style="cursor: default;" src="http://ib.adnxs.com/seg?t=2&amp;amp;add=422891" border="0" /&gt;&lt;a title="Title of this entry." href="http://geekswithblogs.net/mnf/archive/2012/09/04/what-is-testable-code.aspx"&gt;What is testable code?&lt;/a&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;Reading the links someone can feel that any static methods are bad for testability. However it is a wrong impression- static methods without external dependencies are good for testing.&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; &lt;/span&gt;&lt;a style="font:/normal Tahoma; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" href="http://programmers.stackexchange.com/questions/5757/is-static-universally-evil-for-unit-testing-and-if-so-why-does-resharper-recom"&gt;http://programmers.stackexchange.com/questions/5757/is-static-universally-evil-for-unit-testing-and-if-so-why-does-resharper-recom&lt;br /&gt;&lt;/a&gt;&lt;blockquote style="font:/normal Tahoma; margin: 0px 0px 0px 40px; padding: 0px; border: currentColor; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font: 16px/normal Times; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; border-spacing: 0px; orphans: 2; widows: 2; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-text-decorations-in-effect: none;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt;There is nothing wrong with static methods and they are easy to test (so long as they don't change any static data). For instance, think of a Maths library, which is good candidate for a static class with static methods&lt;/span&gt;&lt;/span&gt; 
&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font: 16px/normal Times; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; border-spacing: 0px; orphans: 2; widows: 2; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-text-decorations-in-effect: none;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt;Static methods which hold no state and cause no side effects should be easily unit testable. In fact, I consider such methods a "poor-man's" form of functional programming; you hand the method an object or value, and it returns an object or value. Nothing more. I don't see how such methods would negatively affect unit testing at all.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;Alternatively you can &lt;/span&gt;&lt;span style="font-family: Times; font-size: 16px; border-collapse: separate; border-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt;mock anything - implemented by MS Fakes, TypeMock, JustMock and Moles.  They rely on .NET's&lt;a style="margin: 0px; padding: 0px; border: 0px currentColor; color: rgb(182, 77, 39); text-decoration: none; vertical-align: baseline; cursor: pointer;" href="http://msdn.microsoft.com/en-us/magazine/cc188743.aspx" rel="nofollow"&gt;Profiling API&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Times; font-size: 16px; border-collapse: separate; border-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt;. It can intercept any of your CIL instructions.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Times; font-size: 16px; border-collapse: separate; border-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Times; font-size: 16px; border-collapse: separate; border-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt;See related links  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="font-family: Times; font-size: 16px; border-collapse: separate; border-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;span style="text-align: left; color: rgb(51, 51, 51); line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; border-collapse: collapse;"&gt;&lt;a style="line-height: 18px; font-family: Tahoma, Geneva, Arial, sans-serif;" href="http://stackoverflow.com/questions/9677445/mock-framework-vs-ms-fakes-frameworks"&gt;&lt;font size="3"&gt;http://stackoverflow.com/questions/9677445/mock-framework-vs-ms-fakes-frameworks&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;h1 style="margin: 0px 0px 10px; color: rgb(63, 82, 156); line-height: normal; font-family: &amp;quot;Segoe UI&amp;quot;, Verdana, Arial; font-style: normal; font-variant: normal; font-weight: bold;"&gt;&lt;font color="#333333" face="Tahoma, Geneva, Arial, sans-serif" size="3"&gt;&lt;span style="line-height: 18px; border-collapse: collapse; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh549175(v=vs.110).aspx"&gt;Isolating Code under Test with Microsoft Fakes&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; &lt;/div&gt;&lt;br /&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152121.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/02/16/static-methods-not-always-bad-for-testability.aspx</guid>
            <pubDate>Sat, 16 Feb 2013 04:24:22 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152121.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/02/16/static-methods-not-always-bad-for-testability.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152121.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152121.aspx</trackback:ping>
        </item>
        <item>
            <title>Using PostSharp.Toolkit.Diagnostics, when not all developers have Pro licenses.</title>
            <category>.Net Framework</category>
            <category>Visual Studio/TFS</category>
            <category>.Net Framework</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/02/16/using-postsharp.toolkit.diagnostics-when-not-all-developers-have-pro-licenses.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/02/16/using-postsharp.toolkit.diagnostics-when-not-all-developers-have-pro-licenses.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/02/16/using-postsharp.toolkit.diagnostics-when-not-all-developers-have-pro-licenses.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;We have only couple of developers who are using &lt;span style="font-size: 9pt;"&gt;&lt;a href="http://www.sharpcrafters.com/blog/post/Configuring-PostSharp-Diagnostics-Toolkits.aspx"&gt;PostSharp.Toolkit.Diagnostics &lt;/a&gt;and having &lt;a href="http://www.sharpcrafters.com/purchase/compare"&gt; P&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;a href="http://www.sharpcrafters.com/purchase/compare"&gt;ostSharp Pro li&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;a href="http://www.sharpcrafters.com/purchase/compare"&gt;cense &lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 9pt; background-color: rgba(255, 255, 255, 0.003906);"&gt;However ther are much more&lt;/span&gt; &lt;font size="2"&gt;developers , who are building our solution, but do not required &lt;/font&gt;&lt;span style="font-size: 9pt;"&gt;Toolkit.Diagnostics &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;XmlMulticast&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt; features, that are referred in &lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;%ProjName%.psproj file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 9pt;"&gt;As a workaround I've suggested to to replace locally &lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;psproj file with dummy, that doesn't have &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;XmlMulticast&lt;font color="#000000" size="2"&gt;(PostSharp feature that available only in Pro edition).&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: 12px;"&gt;If a developer doesn't have &lt;span style="color: rgb(0, 0, 255);"&gt;PostSharp &lt;/span&gt;Pro license, they shoul set &lt;b&gt;&lt;font color="darkred"&gt; Environment variable &lt;/font&gt;&lt;/b&gt;&lt;span style="color: rgb(1, 1, 1); font-family: Consolas;"&gt;POSTSHARP_PRO=false to effectively exclude psproj from the build on their local machine.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(1, 1, 1); font-family: Consolas;"&gt;detailed instructions i&lt;/span&gt;&lt;b&gt;&lt;font color="darkred"&gt;How to Add, Remove or Edit Environment variables in Windows 7 can be found at &lt;/font&gt;&lt;/b&gt;&lt;a href="http://www.itechtalk.com/thread3595.html"&gt;http://www.itechtalk.com/thread3595.html&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;For Each project using &lt;span style="font-size: 9pt;"&gt;PostSharp.Toolkit.Diagnostics  A subfolder &lt;/span&gt;DEV.Config has been created.&lt;/div&gt;&lt;div&gt;It includes minimal &lt;/div&gt;&lt;div&gt;dev.psproj , &lt;/div&gt;&lt;div&gt;PreBuild.cmd&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;And (optionally) copy of MyProect.psproj - backup copy of real .psproj file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;For each project that uses toolkit Insert into PreBuild Event command line&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;cmd /c $(ProjectDir)\DEV.Config\PreBuild.cmd $(ProjectName)&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;font color="#010101" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;&lt;div align="left" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#010101" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;strong&gt;File DEV.Config\PreBuild.cmd&lt;/strong&gt;&lt;/div&gt;&lt;div align="left" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;rem developers without PostSharp Pro installed please set environment variable POSTSHARP_PRO=false&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;REM Insert into PreBuild Event command line&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;REM cmd /c $(ProjectDir)\DEV.Config\PreBuild.cmd $(ProjectName)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;if NOT '%POSTSHARP_PRO%=='false goto end&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;:devPsproj&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;rem The current dir seems to be \bin\Debug&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;cd ..\..\Dev.Config&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;set ProjName=%1&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;set PSProjFile=..\%ProjName%.psproj&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ATTRIB -R %PSProjFile%&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;copy /Y dev.psproj %PSProjFile%&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;:end&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;rem pause&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align="left" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#010101" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#010101" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;See also Nuget command line&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152120.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/02/16/using-postsharp.toolkit.diagnostics-when-not-all-developers-have-pro-licenses.aspx</guid>
            <pubDate>Sat, 16 Feb 2013 03:57:30 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152120.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/02/16/using-postsharp.toolkit.diagnostics-when-not-all-developers-have-pro-licenses.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152120.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152120.aspx</trackback:ping>
        </item>
        <item>
            <title>VAB  ValidationResults Extensions</title>
            <category>.Net Framework</category>
            <category>.Net Framework</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/02/16/vab--validationresults-extensions.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/02/16/vab--validationresults-extensions.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/02/16/vab--validationresults-extensions.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;We've started to actively used &lt;font color="#000000"&gt;Microsoft Enterprise Library Validation Enterprise Block (&lt;/font&gt; VAB)  and I was surprised , that a few commonly used  operations are not supplied(or I haven't found them) out of the box.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt; background-color: rgba(255, 255, 255, 0.003906);"&gt;See two extensions, that make use of VAB simpler&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;static&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;class&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResultsExtensions&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;static&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CombinedMessage(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;this&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;errorMessage = (&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;from&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;res&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;in&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;select&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;String&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.Format(&lt;/span&gt;&lt;/font&gt;&lt;font color="#a31515" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#3cb371" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;{0}&lt;/span&gt;&lt;/font&gt;&lt;font color="#a31515" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;:&lt;/span&gt;&lt;/font&gt;&lt;font color="#3cb371" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;{1}&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#a31515" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;, res.Key, res.Message)).ToDelimitedString(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#a31515" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;";"&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;return&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;errorMessage;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;a&gt;//Throws&lt;/a&gt; &lt;/span&gt;&lt;/font&gt;&lt;span style="color: rgb(43, 145, 175); font-family: Consolas; font-size: 12px;"&gt;ValidationException if not valid&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;          &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;static&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;void&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidateConstraints&amp;lt;T&amp;gt;(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;this&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;T target)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;           {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Validator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;validator =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationFactory&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.CreateValidator&amp;lt;T&amp;gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;var&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;               validator.Validate(target, results);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;if&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(results.IsValid ==&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;false&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;               {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                  &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;var&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;errorMessage = results.CombinedMessage();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                  &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;throw&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationException&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(errorMessage);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;               }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;           }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left" style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       }v&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152119.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/02/16/vab--validationresults-extensions.aspx</guid>
            <pubDate>Sat, 16 Feb 2013 03:46:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152119.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/02/16/vab--validationresults-extensions.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152119.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152119.aspx</trackback:ping>
        </item>
        <item>
            <title>Using CollectionNotEmptyValidator</title>
            <category>.Net Framework</category>
            <category>.Net Framework</category>
            <category>CodeProject</category>
            <link>http://geekswithblogs.net/mnf/archive/2013/02/16/using-collectionnotemptyvalidator.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2013/02/16/using-collectionnotemptyvalidator.aspx'&gt;http://geekswithblogs.net/mnf/archive/2013/02/16/using-collectionnotemptyvalidator.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Helvetica"&gt;&lt;span style="line-height: 19px; font-size: 15px; white-space: nowrap;"&gt;We recently started to use &lt;/span&gt;&lt;/font&gt;Microsoft Enterprise Library Validation Enterprise Block&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; (&lt;font face="Helvetica"&gt;&lt;span style="line-height: 19px; font-size: 15px; white-space: nowrap;"&gt;VAB) to check interfaces between modules. One of the properties to validate is array  &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Helvetica"&gt;&lt;span style="line-height: 19px; font-size: 15px; white-space: nowrap;"&gt;of values, that should be not empty, and shoul include one of expected values. &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font face="Helvetica"&gt;&lt;span style="line-height: 19px; font-size: 15px; white-space: nowrap; background-color: rgba(255, 255, 255, 0.003906);"&gt;I found &lt;/span&gt;&lt;/font&gt;&lt;span style="color: rgb(43, 145, 175); font-family: &amp;quot;Courier New&amp;quot;; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;CollectionNotEmptyValidator at&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;a href="http://www.eggheadcafe.com/tutorials/xaml/9af7ac1a-d7f3-4e00-9aec-33ef1ec7d1a3/wpf-custom-validation-using-the-enterprise-library.aspx"&gt;http://www.eggheadcafe.com/tutorials/xaml/9af7ac1a-d7f3-4e00-9aec-33ef1ec7d1a3/wpf-custom-validation-using-the-enterprise-library.aspx&lt;/a&gt;, that allows to  validate the property to satisfy part of requirements.&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt; &lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;The class mostly works as is, I've only changed exception to Validation error if object to validate is not a collection.&lt;/span&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;override&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;void&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;DoValidate(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;object&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;objectToValidate,&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;object&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;currentTarget,&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;string&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;key,&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;validationResults)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;if&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(objectToValidate&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;is&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ICollection&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                           &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;if&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;((((&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ICollection&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;)objectToValidate).Count != 0) == Negated)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                           {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                                  LogValidationResult(validationResults, MessageTemplate, currentTarget, key);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                           }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                 &lt;b&gt;    &lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;b&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;else&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;                     {&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;p style="margin: 0pt; padding: 0px; color: rgb(80, 80, 80); font-family: &amp;quot;Segoe UI&amp;quot;; font-size: 13px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; white-space: pre-wrap;"&gt;&lt;span style="color: blue;"&gt;&lt;strike style="background-color: rgba(255, 255, 255, 0.003906);"&gt;//throw&lt;/strike&gt;&lt;/span&gt; &lt;strike style="background-color: rgba(255, 255, 255, 0.003906);"&gt;&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;ApplicationException&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"Object type not supported by validator."&lt;/span&gt;);&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                           LogValidationResult(validationResults,&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#a31515" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;"Object is not a collection."&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;, currentTarget, key);&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;b&gt;                     }&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; white-space: pre-wrap;"&gt;I've also changed testing console app to a number of MSTest TestMethods.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;#region&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Namespace Imports&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;System;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;System.Collections.ObjectModel;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;System.Diagnostics;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;System.Linq;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Microsoft.Practices.EnterpriseLibrary.Validation;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Microsoft.SDC.Common.Validation;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Microsoft.SDC.Common.Web.WCF;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;using&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Microsoft.VisualStudio.TestTools.UnitTesting;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;#endregion&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;namespace&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;MSCommon.Validation&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;{&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 128, 0); font-family: Consolas; font-size: 9pt;"&gt;// I have defined an Order class&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//      containing an Items property for this. There are four possible cases we can test:&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//- Collection is empty, Negated property is false&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//- Collection is non-empty, Negated property is false&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//- Collection is non-empty, Negated property is true&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//- Collection is empty, Negated property is true&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       [&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;TestClass&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;class&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidatorTests&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              [&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;TestMethod&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(),&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CITest&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;void&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;InvalidTest_CollectionIsEmpty()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Invalid test - collection is empty&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;var&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;order = NewEmptyOrder();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;validator =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results = validator.Validate(order.Items);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Assert&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.IsTrue(!results.IsValid);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Debug&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.WriteLine(results.First().Message);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Output: The collection must not be empty.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              [&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;TestMethod&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(),&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CITest&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;void&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidTest_CollectionIsEmpty()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Valid test - collection has items&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;var&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;order = NewEmptyOrder();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     order.Items.Add(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;OrderItem&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;validator =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results = validator.Validate(order.Items);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Assert&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.IsTrue(results.IsValid);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Debug&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.WriteLine(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#a31515" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;"Valid test"&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              [&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;TestMethod&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(),&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CITest&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;void&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;NegatedTest_CollectionHasItems()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Invalid test - collection has items (Negated)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;var&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;order = NewEmptyOrder();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     order.Items.Add(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;OrderItem&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;validator =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;true&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results = validator.Validate(order.Items);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Assert&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.IsTrue(!results.IsValid);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Debug&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.WriteLine(results.First().Message);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Output: The collection must be empty.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              [&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;TestMethod&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(),&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CITest&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;void&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;NegatedTest_CollectionIsEmpty()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Invalid test - collection has items (Negated)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;var&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;order = NewEmptyOrder();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     order.Items.Add(&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;OrderItem&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;());&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;validator =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;(&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;true&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidationResults&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;results = validator.Validate(order.Items);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Assert&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.IsTrue(!results.IsValid);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Debug&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.WriteLine(results.First().Message);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;// Output: The collection must be empty.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;private&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;static&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;NewEmptyOrder()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;order =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     order.Items =&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Collection&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;.&lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;OrderItem&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;gt;();&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;return&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;order;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              #region&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Example Classes for tests&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;class&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Order&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     [&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;CollectionNotEmptyValidator&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;()]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Collection&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;OrderItem&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;gt; Items {&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;get&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;;&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;set&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;; }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;bool&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;ValidateItems()&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                           &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;return&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;Items.Count &amp;gt; 0;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     &lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;public&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;class&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#2b91af" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;OrderItem&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     {&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;                     }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;              #endregion&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;//Example Classes for tests&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;       }&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font face="Consolas" size="1"&gt;&lt;span style="font-size: 9pt;"&gt;}&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;I am planning to create derived ContainValidator.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/152118.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2013/02/16/using-collectionnotemptyvalidator.aspx</guid>
            <pubDate>Sat, 16 Feb 2013 03:35:24 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/152118.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2013/02/16/using-collectionnotemptyvalidator.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/152118.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/152118.aspx</trackback:ping>
        </item>
        <item>
            <title>I stopped to use GoogleDrive in favor to EverNote.</title>
            <category>Blogging</category>
            <category>iPad</category>
            <link>http://geekswithblogs.net/mnf/archive/2012/12/15/i-stopped-to-use-googledrive-in-favor-to-evernote.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2012/12/15/i-stopped-to-use-googledrive-in-favor-to-evernote.aspx'&gt;http://geekswithblogs.net/mnf/archive/2012/12/15/i-stopped-to-use-googledrive-in-favor-to-evernote.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;p style="font: 15px/22px arial, sans-serif; margin: 11px 0px 22px; padding: 0px; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: hidden; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="margin: 0px; padding: 0px; background-color: rgba(255, 255, 255, 0.0039062);"&gt;&lt;br /&gt;
For a long time I've used Google Docs to write different notes, collect links for search and drafts of my posts.&lt;/span&gt;&lt;/p&gt;&lt;p style="font: 15px/22px arial, sans-serif; margin: 11px 0px 22px; padding: 0px; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: hidden; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.0039062);"&gt;Later on IPad I've started to use&lt;span&gt; &lt;/span&gt;&lt;a href="http://evernote.com/"&gt;EverNote&lt;/a&gt;. The main advantage for me was that EverNote allows to create new notes when offline and even for normal account usually allow access existing notes (but sometimes telling that a note is not available). And since EverNote implemented auto save on IPad, I stopped using Google Drive. I am able to use EverNote Desktop on home and work PCs, from different browsers, from IPad and Windows Phone.&lt;/span&gt;&lt;/p&gt;&lt;p style="font: 15px/22px arial, sans-serif; margin: 11px 0px 22px; padding: 0px; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: hidden; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt;Additional very convenient tool &lt;/span&gt;on IPad&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt; is EverClip ( &lt;/span&gt;&lt;span style="line-height: 19px; font-family: Helvetica; white-space: nowrap;"&gt;&lt;a href="http://clip.ignition.hk/?locale=en&amp;amp;utm_source=homepage"&gt;http://clip.ignition.hk/?locale=en&amp;amp;utm_source=homepage&lt;/a&gt; &lt;/span&gt;&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt;), that copies text together with the URL(from Browser page) to notes. &lt;/span&gt;&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt;I am missing similar facility in PC browsers.&lt;/span&gt;&lt;/p&gt;&lt;p style="font: 15px/22px arial, sans-serif; margin: 11px 0px 22px; padding: 0px; color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: hidden; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt;Yesterday I've copied one of my old documents to Evernote and found, that links in the document are broken and cause error like the following&lt;/span&gt;&lt;b style="background-color: rgb(255, 255, 255);"&gt;:&lt;/b&gt;&lt;/p&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;font color="#ff0000"&gt;&lt;b style="margin: 0px; padding: 0px;"&gt;404.&lt;/b&gt; &lt;ins style="margin: 0px; padding: 0px; text-decoration: none;"&gt;That’s an error.&lt;br /&gt;&lt;/ins&gt;The requested URL &lt;code style="margin: 0px; padding: 0px; font-family: arial, sans-serif;"&gt;/http%3A%2F%&lt;a style="margin: 0px; padding: 0px;" href="http://2fstackoverflow.com/"&gt;2Fstackoverflow.com&lt;/a&gt;%2Fquestions%2F3110456%2Fpostsharp-build-targets-not-running-when-using-debug-configuration&lt;/code&gt; was not found on this server. &lt;ins style="margin: 0px; padding: 0px; text-decoration: none;"&gt;That’s all we know.&lt;/ins&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style="font: 15px/22px arial, sans-serif; margin: 11px 0px 22px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: hidden; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;/p&gt;&lt;ins style="margin: 0px; padding: 0px; text-decoration: none;"&gt;So Google Drive stores URL in encoded format, which making harder to copy texts with links. It's easy to fix, but annoying. Hopefully I would not need to copy many files from G&lt;/ins&gt;oogle Drive.v&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/151560.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2012/12/15/i-stopped-to-use-googledrive-in-favor-to-evernote.aspx</guid>
            <pubDate>Sat, 15 Dec 2012 01:54:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/151560.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2012/12/15/i-stopped-to-use-googledrive-in-favor-to-evernote.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/151560.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/151560.aspx</trackback:ping>
        </item>
        <item>
            <title> Enterprise Instrumentation: The 'sessionName' parameter of value 'TraceSession' is not valid</title>
            <category>Testing/Debugging/Logging</category>
            <link>http://geekswithblogs.net/mnf/archive/2012/12/09/enterprise-instrumentation-the-sessionname-parameter-of-value-tracesession-is.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2012/12/09/enterprise-instrumentation-the-sessionname-parameter-of-value-tracesession-is.aspx'&gt;http://geekswithblogs.net/mnf/archive/2012/12/09/enterprise-instrumentation-the-sessionname-parameter-of-value-tracesession-is.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;We are still using &lt;/span&gt;&lt;/font&gt;&lt;span style="color: rgb(1, 1, 1); font-family: Calibri; font-size: 15px;"&gt;Enterprise Instrumentation(that was created during .Net 1.1 time)&lt;/span&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;In new Server 2008 environment and IIS 7 we have the following errors:&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;The 'sessionName' parameter of value 'TraceSession' is not valid. A trace session of this name does not exist in the TraceSessions configuration file for Windows Trace Session Manager service. Ensure that a session of this name exists in the TraceSessions configuration file and that the Windows Trace Session Manager service is started.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;div align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;   at Microsoft.EnterpriseInstrumentation.EventSinks.TraceEventSink..ctor(IDictionary parameters, EventSource eventSource)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;   --- End of inner exception stack trace ---&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;   at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct&amp;amp; signature, RuntimeType declaringType)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#ff0000" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;   at Microsoft.EnterpriseInstrumentation.EventSinks.EventSink.CreateNewEventSinks(DataRow[] eventSinkRows, EventSource eventSource)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;div&gt;&lt;span style="color: rgb(1, 1, 1); font-family: Calibri; font-size: 15px;"&gt;I’ve seen the same errors on development Win7 machines when using IIS. It seems not a problem on Cassini.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(1, 1, 1); font-family: Calibri; font-size: 15px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;I've checked ,that Windows Trace Session Manager Service has started and &lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;The file C:\Program Files (x86)\Microsoft Enterprise Instrumentation\Bin\Trace Service\TraceSessions.config has corresponding entry&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;lt;configuration xmlns="http://www.microsoft.com/schema/EnterpriseInstrumentation/v1/TraceSessions.xsd"&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;                &amp;lt;defaultParameters minBuffers="4" maxFileSize="10" maxBuffers="25" bufferSize="20" logFileMode="sequential" flushTimer="3" /&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;                &amp;lt;sessionList&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;                                &lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span style="font-size: 11pt; background-color: rgb(255, 255, 0);"&gt;&amp;lt;session name="TraceSession"&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;enabled="false" fileName="C:\Program Files (x86)\Microsoft Enterprise Instrumentation\Bin\Trace Service\Logs\TraceLog.log" /&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;                &amp;lt;/sessionList&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;The errors still continue, but I was able to disable  the parameter in  &lt;/span&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;eventSink&lt;/span&gt;&lt;/font&gt; configuration&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;font color="#010101" face="Calibri"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" align="left"&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;   &amp;lt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;eventSink&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#ff0000" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;name&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;=&lt;/span&gt;&lt;/font&gt;&lt;font color="#010101" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;traceSink&lt;/span&gt;&lt;/font&gt;&lt;font color="#010101" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#ff0000" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;description&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;=&lt;/span&gt;&lt;/font&gt;&lt;font color="#010101" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;Outputs events to the Windows Event Trace.&lt;/span&gt;&lt;/font&gt;&lt;font color="#010101" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#ff0000" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;type&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;=&lt;/span&gt;&lt;/font&gt;&lt;font color="#010101" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;Microsoft.EnterpriseInstrumentation.EventSinks.TraceEventSink&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#010101" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;                &amp;lt;!--&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#008000" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;MNF disabled parameter to  avoid error "The 'sessionName' parameter of value 'TraceSession' is not valid"&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;font color="#0000ff"&gt;                  &lt;/font&gt;&lt;font color="#328712"&gt;   &amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#328712"&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;parameter&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;name&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;=&lt;/span&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;sessionName&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;value&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;=&lt;/span&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;TraceSession&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;"&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;div&gt;                    &lt;span style="color: rgb(0, 0, 255); font-family: Consolas; font-size: 12px;"&gt;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;    &amp;lt;/&lt;/span&gt;&lt;/font&gt;&lt;span&gt; &lt;/span&gt;&lt;font color="#a31515" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;eventSink&lt;/span&gt;&lt;/font&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;font color="#0000ff" size="1" face="Consolas"&gt;&lt;span style="font-size: 9pt;"&gt;Related old post &lt;/span&gt;&lt;/font&gt;&lt;a href="http://bytes.com/topic/net/answers/104761-enterprise-instrumentation-windows-trace-session-manager"&gt;http://bytes.com/topic/net/answers/104761-enterprise-instrumentation-windows-trace-session-manager&lt;/a&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;One day I wish to replace all &lt;span style="color: rgb(1, 1, 1); font-family: Calibri; font-size: 15px;"&gt;EnterpriseInstrumentation calls with NLog.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/151474.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2012/12/09/enterprise-instrumentation-the-sessionname-parameter-of-value-tracesession-is.aspx</guid>
            <pubDate>Sun, 09 Dec 2012 05:04:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/151474.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2012/12/09/enterprise-instrumentation-the-sessionname-parameter-of-value-tracesession-is.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/151474.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/151474.aspx</trackback:ping>
        </item>
        <item>
            <title>Eager Loading more than 1 table in LinqtoSql</title>
            <category>SQL Server</category>
            <category>LINQ</category>
            <link>http://geekswithblogs.net/mnf/archive/2012/12/09/eager-loading-more-than-1-table-in-linqtosql.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2012/12/09/eager-loading-more-than-1-table-in-linqtosql.aspx'&gt;http://geekswithblogs.net/mnf/archive/2012/12/09/eager-loading-more-than-1-table-in-linqtosql.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;When I've tried in Linq2Sql to load table with 2 child tables, I've noticed, that multiple SQLs are generated. I've f&lt;a href="http://stackoverflow.com/questions/644576/linq2sql-eager-load-with-multiple-dataloadoptions"&gt;ound that  it is&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(0, 128, 0); font-family: Consolas; font-size: 12px;"&gt;&lt;a href="http://stackoverflow.com/questions/644576/linq2sql-eager-load-with-multiple-dataloadoptions"&gt;a known issue&lt;/a&gt;, if you try to specify more than one to pre-load it just  picks which one to pre-load and which others to leave deferred (simply ignoring those LoadWith hints)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(0, 128, 0); font-family: Consolas; font-size: 12px;"&gt;There are more explanations in &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;a href="http://codebetter.com/blogs/david.hayden/archive/2007/08/06/linq-to-sql-query-tuning-appears-to-break-down-in-more-advanced-scenarios.aspx" rel="nofollow"&gt;http://codebetter.com/blogs/david.hayden/archive/2007/08/06/linq-to-sql-query-tuning-appears-to-break-down-in-more-advanced-scenarios.aspx&lt;/a&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div&gt;The reason the relationship in your blog post above is generating multiple queries is that you have two (1:n) relationship (Customers-&amp;gt;Orders) and (Orders-&amp;gt;OrderDetails). If you just had one (1:n) relationship (Customer-&amp;gt;Orders) or (Orders-&amp;gt;OrderDetails) LINQ to SQL would optimize and grab it in one query (using a JOIN). &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;
The alternative -to use SQL and POCO classes-see &lt;a href="http://stackoverflow.com/questions/238504/linq-to-sql-loading-child-entities-without-using-dataloadoptions?rq=1"&gt;http://stackoverflow.com/questions/238504/linq-to-sql-loading-child-entities-without-using-dataloadoptions?rq=1&lt;/a&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;Fortunately the&lt;span&gt; &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/adonet/archive/2008/10/07/migrating-from-linq-to-sql-to-entity-framework-eager-loading.aspx"&gt;problem is not applicable&lt;/a&gt;&lt;span&gt; &lt;/span&gt;to &lt;font color="#006400"&gt;Entity Framework&lt;/font&gt;, that we want to use in future development instead of Linq2Sql&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;&lt;pre&gt;Product firstProduct =  db.Product.Include("OrderDetail").Include("Supplier").First();
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;м&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/151473.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2012/12/09/eager-loading-more-than-1-table-in-linqtosql.aspx</guid>
            <pubDate>Sun, 09 Dec 2012 04:45:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/151473.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2012/12/09/eager-loading-more-than-1-table-in-linqtosql.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/151473.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/151473.aspx</trackback:ping>
        </item>
        <item>
            <title>Do NOT Change "Copy Local” project references to false, unless understand subsequences.</title>
            <category>Visual Studio/TFS</category>
            <category>.Net Framework</category>
            <category>.Net Framework</category>
            <link>http://geekswithblogs.net/mnf/archive/2012/12/09/do-not-change-copy-local-project-references-to-false-unless.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2012/12/09/do-not-change-copy-local-project-references-to-false-unless.aspx'&gt;http://geekswithblogs.net/mnf/archive/2012/12/09/do-not-change-copy-local-project-references-to-false-unless.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div style="font-family: Times;"&gt;&lt;span style="text-align: left; font-family: Arial; background-color: rgba(255, 255, 255, 0);"&gt;&lt;font size="3" style="line-height: 36px;"&gt;T&lt;/font&gt;&lt;font size="3" style="line-height: 1.15;"&gt;o optimize performance of visual studio build I've found multiple recommendations to change &lt;/font&gt;&lt;/span&gt;&lt;span style="text-align: left; line-height: 1.15; background-color: rgba(255, 255, 255, 0);"&gt;&lt;font size="3"&gt;CopyLocal property for dependent dlls to false,&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol style="margin: 0px; padding: 0px; font-family: Times;" start="1"&gt;&lt;li style="list-style: none;"&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol style="margin: 0px; padding: 0px; font-family: Times;" start="1"&gt;&lt;li style="list-style: none;"&gt;e.g. &lt;span style="text-align: left; line-height: 1.15; font-family: Arial;"&gt;From &lt;a href="http://stackoverflow.com/questions/690033/best-practices-for-large-solutions-in-visual-studio-2008"&gt;http://stackoverflow.com/questions/690033/best-practices-for-large-solutions-in-visual-studio-2008&lt;/a&gt;&lt;/span&gt;&lt;span style="text-align: left; line-height: 1.15; font-family: Arial;"&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul style="margin: 0px; padding: 0px;"&gt;&lt;li style="margin: 0px 0px 0px 36pt; padding: 0px; font-family: Arial; direction: ltr;"&gt;&lt;span style="font-weight: bold;"&gt;CopyLocal?&lt;/span&gt; For sure turn this off&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap;" href="http://stackoverflow.com/questions/280751/what-is-the-best-practice-for-copy-local-and-with-project-references"&gt;http://stackoverflow.com/questions/280751/what-is-the-best-practice-for-copy-local-and-with-project-references&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px;"&gt;Always set the Copy Local property to false and enforce this via a custom msbuild step&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a style="text-align: left; line-height: 1.15; font-family: Arial;" href="http://codebetter.com/patricksmacchia/2007/06/20/benefit-from-the-c-and-vb-net-compilers-perf/Benefit"&gt;http://codebetter.com/patricksmacchia/2007/06/20/benefit-from-the-c-and-vb-net-compilers-perf/Benefit&lt;/a&gt;&lt;span style="text-align: left; line-height: 1.15; font-family: Arial;"&gt;&lt;a href="http://codebetter.com/patricksmacchia/2007/06/20/benefit-from-the-c-and-vb-net-compilers-perf/Benefit"&gt;Benefit&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;My advice is to always set ‘&lt;span style="font-style: italic;"&gt;Copy Local&lt;/span&gt;’ to false&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;h1 style="margin: 0px; padding: 24pt 0px 6pt; text-align: left; line-height: 1.15; font-family: Arial; direction: ltr;"&gt;&lt;font size="2"&gt;Some time ago we've tried to change the setting to false, and found that it causes problem for deployment of top-level projects.&lt;/font&gt;&lt;/h1&gt;&lt;h1 style="margin: 0px; padding: 24pt 0px 6pt; text-align: left; line-height: 1.15; font-family: Arial; direction: ltr;"&gt;&lt;font size="2"&gt;Recently I've followed the suggestion and changed the settings for middle-level projects. It didn't cause immediate issues, but I was warned by Readify Consultant&lt;span&gt; &lt;/span&gt;&lt;/font&gt;&lt;a href="https://twitter.com/clnsvg"&gt;&lt;font size="2"&gt;Colin Savage&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;&lt;span&gt; &lt;/span&gt;about possible errors during deployments&lt;/font&gt;&lt;/h1&gt;&lt;h1 style="margin: 0px; padding: 24pt 0px 6pt; text-align: left; line-height: 1.15; font-family: Arial; direction: ltr;"&gt;&lt;font size="2"&gt;I haven't undone the changes immediately and we found a few issues during testing.&lt;/font&gt;&lt;/h1&gt;&lt;p style="margin: 0px; padding: 24pt 0px 6pt; text-align: left; line-height: 1.15; font-family: Arial; direction: ltr;"&gt;&lt;span style="line-height: 1.15; font-size: medium;"&gt;There are many scenarios, when you need to have &lt;/span&gt;&lt;span style="line-height: 1.15; font-size: medium; font-style: italic;"&gt;Copy Local' &lt;/span&gt;&lt;span style="line-height: 1.15; font-size: medium;"&gt;left to True.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0px; padding: 24pt 0px 6pt; text-align: left; line-height: 1.15; font-family: Arial; direction: ltr;"&gt;&lt;span style="line-height: 1.15; font-size: medium;"&gt;&lt;font size="2"&gt;T&lt;/font&gt;&lt;span style="background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;font face="Helvetica"&gt;&lt;span style="font-size: 14px;"&gt;he concerns are highlighted in some StackOverflow answers, but they have small number of votes.&lt;font face="Arial" size="2"&gt;T&lt;/font&gt;&lt;span style="background-color: rgb(251, 251, 251); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;font face="Helvetica"&gt;&lt;span style="font-size: 14px;"&gt;he concerns are highlighted in some StackOverflow answers, but they have small number of votes.&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="line-height: 1.15; font-size: medium;"&gt;&lt;/span&gt;&lt;h1 style="margin: 0px; padding: 24pt 0px 6pt; text-align: left; line-height: 1.15; font-family: Arial; direction: ltr;"&gt;&lt;font face="Times New Roman"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;strong&gt;&lt;font size="3"&gt;Top-level projects:&lt;/font&gt;&lt;/strong&gt; &lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 20px; background-color: rgb(255, 255, 255);"&gt; &lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 20px; background-color: rgb(255, 255, 255);"&gt;&lt;font size="3"&gt;set copy local = true&lt;/font&gt;&lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);"&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: rgba(255, 255, 255, 0.003906);"&gt;First of all, it doesn't work correctly for top-level projects, i.e. executables or web sites.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;As pointed in the answer &lt;a href="http://stackoverflow.com/a/6529461/52277"&gt;http://stackoverflow.com/a/6529461/52277&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote style="margin-right: 0px;" dir="ltr"&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;for all the references in the one at the top set copy local = true.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;/span&gt; &lt;/div&gt;&lt;/blockquote&gt;&lt;div dir="ltr"&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;Alternatively you have to change output directory as it's described in &lt;/span&gt;&lt;span style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap;"&gt;&lt;a href="http://www.simple-talk.com/dotnet/.net-framework/partitioning-your-code-base-through-.net-assemblies-and-visual-studio-projects/"&gt;http://www.simple-talk.com/dotnet/.net-framework/partitioning-your-code-base-through-.net-assemblies-and-visual-studio-projects/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="line-height: 19px; font-family: Helvetica; font-size: 15px; white-space: nowrap;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;If you set ‘ &lt;/span&gt;&lt;i style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;Copy Local = false’,&lt;/i&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt; VS will, unless you tell it otherwise, place each assembly alone in its own &lt;/span&gt;&lt;i style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;.\bin\Debug&lt;/i&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;directory. Because of this, you will need to configure VS to place assemblies together in the same directory. To do so, for each VS project, go to &lt;/span&gt;&lt;i style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;VS &amp;gt; Project Properties &amp;gt; Build tab &amp;gt; Output path&lt;/i&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;, and set the &lt;/span&gt;&lt;i style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;Ouput path&lt;/i&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt; to &lt;/span&gt;&lt;i style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;..\bin\Debug&lt;/i&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;for debug configuration, and &lt;/span&gt;&lt;i style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;..\bin\Release&lt;/i&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt; for release configuration.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b style="background-color: rgb(255, 255, 255);"&gt;&lt;span style="font-size: 20px; background-color: rgba(255, 255, 255, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;b style="background-color: rgb(255, 255, 255);"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;span style="font-size: 20px;"&gt;Second-level  dependencies: &lt;/span&gt;&lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 20px;"&gt; &lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 20px;"&gt;set copy local = true&lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px;"&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"&gt;Another example when copylocal =false fails on run-time, is when top level assembly doesn't directly referenced one of indirect dependencies.&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"&gt;E..g. Top-level assembly A has reference to assembly B with &lt;/span&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto;"&gt;copylocal =true, but &lt;/span&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto;"&gt;assembly B has reference to assembly C with &lt;/span&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto;"&gt;copylocal =false. Most likely assembly C will be missing on runtime and will cause errors &lt;/span&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;span style="text-align: justify; color: rgb(51, 51, 51); line-height: 16px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div style="margin: 8px 0px; padding: 0px; font-family: Helvetica; font-size: 14px; white-space: pre-line; word-wrap: break-word; background-color: rgb(251, 251, 251);"&gt;&lt;span style="padding: 4px; border-radius: 6px; color: rgb(255, 255, 255); font-size: 12px; background-color: rgb(153, 153, 153);"&gt;E.g.&lt;/span&gt; &lt;span style="padding-left: 8px; font-size: 12px;"&gt;&lt;a href="http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1"&gt;http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;Copy local is important for deployment scenarios and tools. As a general rule you should use CopyLocal=True&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
and &lt;a style="font-family: Helvetica; font-size: 12px; white-space: pre-line; background-color: rgb(251, 251, 251);" href="http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1"&gt;http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1&lt;/a&gt;&lt;br /&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;div style="margin: 8px 0px; padding: 0px; font-family: Helvetica; white-space: pre-line; word-wrap: break-word; background-color: rgb(251, 251, 251);"&gt;&lt;div&gt;&lt;p style="margin: 0px 0px 14px; padding: 0px; font-size: 14px; white-space: normal; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;Unfortunately there are some quirks and CopyLocal won't necessary work as expected for assembly references in secondary assemblies structured as shown below.&lt;/p&gt;&lt;ul style="margin: 0px; padding: 0px; font-size: 14px; white-space: normal; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;li style="list-style: none; margin: 0px; padding: 0px; border: 0px currentColor; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;MainApp.exe
&lt;ul style="margin: 0px; padding: 0px;"&gt;&lt;li style="list-style: none; margin: 0px; padding: 0px; border: 0px currentColor; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;MyLibrary.dll
&lt;ul style="margin: 0px; padding: 0px;"&gt;&lt;li style="list-style: none; margin: 0px; padding: 0px; border: 0px currentColor; vertical-align: baseline; word-wrap: break-word; background-color: transparent;"&gt;ThirdPartyLibrary.dll (if in the GAC CopyLocal won't copy to MainApp bin folder)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin: 0px 0px 14px; padding: 0px; font-size: 14px; white-space: normal; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;This makes xcopy deployments difficult .&lt;span style="white-space: pre-line;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;div&gt;&lt;b style="background-color: rgb(255, 255, 255);"&gt;&lt;span style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;span style="font-size: 20px;"&gt;Reflection called DLLs  dependencies: &lt;/span&gt;&lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 20px;"&gt; &lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 20px;"&gt;set copy local = true&lt;/span&gt;&lt;span style="text-align: left; line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px;"&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;E.g user can see error&lt;span&gt; &lt;/span&gt;&lt;font color="#ff0000"&gt;"ISystem.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style="margin: 0px; padding: 0px;"&gt;The fix for the issue is recommended in &lt;a href="http://stackoverflow.com/a/6200173/52277"&gt;http://stackoverflow.com/a/6200173/52277&lt;/a&gt;&lt;/p&gt;&lt;p style="margin: 0px; padding: 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0px; padding: 0px;"&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote style="margin: 0px 0px 0px 40px; padding: 0px; border: currentColor;"&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;p style="margin: 0px 0px 1em; padding: 0px; border: 0px currentColor; text-align: left; line-height: 18px; clear: both; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 14px; vertical-align: baseline; word-wrap: break-word; background-color: rgb(255, 255, 255); -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-text-size-adjust: auto;"&gt;"I solved this issue by setting the Copy Local attribute of my project's references to true."&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin: 0px 4px; position: relative; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div&gt;&lt;br style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" /&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="text-align: left; line-height: 1.15; font-family: Arial;"&gt;In general, the problems with investigation of deployment issues may overweight the benefits of reduced build time.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="text-align: left; line-height: 1.15; font-family: Arial;"&gt;&lt;/span&gt;&lt;span style="line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 37px; background-color: rgb(255, 255, 255);"&gt;&lt;font color="#328712" size="3" style="font-size: 20px;"&gt;&lt;/font&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;span style="line-height: 18px; font-family: Arial, &amp;quot;Liberation Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif; font-size: 37px; background-color: rgb(255, 255, 255);"&gt;&lt;font color="#328712" size="3" style="font-size: 20px;"&gt;Setting the Copy Local to false without considering deployment issues i&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;font color="#328712" style="font-size: 20px;"&gt;s not a good idea.&lt;/font&gt; &lt;/font&gt;&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;br /&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/151471.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2012/12/09/do-not-change-copy-local-project-references-to-false-unless.aspx</guid>
            <pubDate>Sun, 09 Dec 2012 02:15:36 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/151471.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2012/12/09/do-not-change-copy-local-project-references-to-false-unless.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/151471.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/151471.aspx</trackback:ping>
        </item>
        <item>
            <title>Adding PostSharp to new projects, when it's installed for some projects in solution.</title>
            <category>.Net Framework</category>
            <category>Testing/Debugging/Logging</category>
            <link>http://geekswithblogs.net/mnf/archive/2012/11/04/adding-postsharp-to-new-projects-when-its-installed-for-some.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/mnf/archive/2012/11/04/adding-postsharp-to-new-projects-when-its-installed-for-some.aspx'&gt;http://geekswithblogs.net/mnf/archive/2012/11/04/adding-postsharp-to-new-projects-when-its-installed-for-some.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: normal;"&gt;Recently I've posted&lt;span&gt; &lt;/span&gt;&lt;a href="http://geekswithblogs.net/mnf/archive/2012/10/17/postsharp-deployment-to-build-machine--use-setup-installation-not-nuget.aspx"&gt;my experience with installation of PostSharp&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h1 style="color: rgb(0, 0, 0); text-transform: none; line-height: normal; text-indent: 0px; letter-spacing: normal; font-family: Verdana; font-size: 14px; font-style: normal; font-variant: normal; margin-top: 18px; margin-bottom: 8px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969);"&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;

&lt;a&gt;&lt;span style="cursor: default;"&gt;Once &lt;/span&gt;&lt;/a&gt;&lt;a&gt;&lt;span style="cursor: default;"&gt;PostSharp  is &lt;/span&gt;&lt;/a&gt;&lt;a&gt;&lt;span style="cursor: default;"&gt;installed in  solution's &lt;/span&gt;&lt;/a&gt;&lt;span style="cursor: default;"&gt;packages folder for some project(s)&lt;/span&gt;&lt;span style="cursor: default;"&gt;, I often need to add PostSharp to another project in the same soluti&lt;/span&gt;on&lt;span style="font-weight: normal; cursor: default;"&gt;Section "&lt;a href="http://doc.sharpcrafters.com/postsharp-2.1/Default.aspx##PostSharp-2.1.chm/html/41129237-a5d4-4acf-aef4-c46759ccfb4b.htm"&gt;Adding PostSharp to your project using PostSharp HQ&lt;/a&gt;&lt;/span&gt;" of documentation &lt;a style="font-weight: normal;"&gt;described the process quite well.&lt;/a&gt;&lt;/div&gt;&lt;/h1&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;a style="font-weight: normal;"&gt;I only want to add that the &lt;/a&gt;&lt;span style="font-family: Verdana; font-size: 11px; background-color: rgb(255, 255, 255);"&gt;&lt;font size="3"&gt; &lt;font face="Tahoma"&gt;actual location of &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;a style="font-family: Verdana; font-size: 11px;"&gt;&lt;span&gt;&lt;font size="3" face="Tahoma"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;h1 style="font-size: 14px; margin-top: 18px; margin-bottom: 8px; display: inline !important;"&gt;&lt;a style="font-family: Verdana; font-size: 11px;"&gt;&lt;span style="cursor: default;"&gt;&lt;font size="3" face="Tahoma"&gt;PostSharp HQ ( if it was installed from NuGet) is&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;&lt;/div&gt;&lt;span style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;[solution root ]packages\PostSharp.2.1.7.15\tools\Release\PostSharp.HQ.exe.&lt;/span&gt;&lt;div style="font:/normal Tahoma; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"&gt;&lt;div&gt;Also you need to ensure that the project is checked out,i.e. not readOnly.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/mnf/aggbug/151166.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michael Freidgeim</dc:creator>
            <guid>http://geekswithblogs.net/mnf/archive/2012/11/04/adding-postsharp-to-new-projects-when-its-installed-for-some.aspx</guid>
            <pubDate>Sun, 04 Nov 2012 07:59:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/mnf/comments/151166.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/mnf/archive/2012/11/04/adding-postsharp-to-new-projects-when-its-installed-for-some.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/mnf/comments/commentRss/151166.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/mnf/services/trackbacks/151166.aspx</trackback:ping>
        </item>
    </channel>
</rss>