title: Issue after regenerating xrm.cs
body: <p><strong>ISSUE:</strong></p>
  
  <p>I am using <code>Microsoft Dynamics CRM 2011</code>. I have added an extension (Customer Service Contacts) to our CRM.</p>
  
  <p>I need to make some respective changes to UI as well. For that, I started my changes with <strong>regeneration of XRM.cs</strong>. </p>
  
  <p>I have done following as a part of that:</p>
  
  <pre><code>C:\Users\&lt;userName&gt;\SDK\Bin&gt;CrmSvcUtil.exe 
  /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,    
  Microsoft.Xrm.Client.CodeGeneration" /out:\Xrm003.cs 
  /url:http://&lt;url_for_server&gt;/&lt;organization_name&gt;/XRMServices/2011/Organization.svc
  /domain:"&lt;domain_name&gt;" /username:"&lt;username&gt;" /password:"&lt;password&gt;" 
  /namespace:&lt;desired_namespace_name&gt; /serviceContextName:XrmServiceContext
  </code></pre>
  
  <p>This helped me regenerate the <code>Xrm003.cs</code>. But, when I am comparing this newly generated Xrm003.cs with the already existing one, I can see some differences in the entities which I have not touched at all.</p>
  
  <p>Following are some of those:</p>
  
  <p>Original one had:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Drop-down list for selecting the category of the account.
      /// &lt;/summary&gt;
      [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountcategorycode")]
      public Microsoft.Xrm.Sdk.OptionSetValue AccountCategoryCode
      {
          get
          {
              return this.GetAttributeValue&lt;Microsoft.Xrm.Sdk.OptionSetValue&gt;("accountcategorycode");
          }
          set
          {
              this.OnPropertyChanging("AccountCategoryCode");
              this.SetAttributeValue("accountcategorycode", value);
              this.OnPropertyChanged("AccountCategoryCode");
          }
      }
  </code></pre>
  
  <p>The new one has:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Drop-down list for selecting the category of the account.
      /// &lt;/summary&gt;
      [Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("accountcategorycode")]
      public System.Nullable&lt;int&gt; AccountCategoryCode
      {
          get
          {
              return this.GetAttributeValue&lt;System.Nullable&lt;int&gt;&gt;("accountcategorycode");
          }
          set
          {
              this.SetAttributeValue&lt;Microsoft.Xrm.Sdk.OptionSetValue&gt;("AccountCategoryCode", "accountcategorycode", value);
          }
      }
  </code></pre>
  
  <p>If you notice the differences, you will see 2 things:</p>
  
  <ol>
  <li><p>Type of <code>AccountCategoryCode</code> is <code>Microsoft.Xrm.Sdk.OptionSetValue</code> (in the original) and <code>System.Nullable&lt;int&gt;</code> in the regenerated.</p></li>
  <li><p>The way <code>set</code> is implemented.</p></li>
  </ol>
  
  <p>This is for many other entities as well.</p>
  
  <p>Can anyone please let me know why is this because of or have I missed any step in regeneration of XRM.cs? Thanks in advance!</p>
  
  <p>EDIT:
  One thing, which might be the cause(?) is: We had applied Rollup 16 to CRM inbetween these 2 XRM.cs.</p>
  
  <hr>
  
  <p><strong>SOLUTION TO RESOLVE ISSUE:</strong></p>
  
  <p>Please refer answer by Daryl, which I have marked as an answer. </p>
  
  <p>I followed what he said and did changes to my XRM.cs regeneration command as follows (following one is the appropriate command, which helped me to resolve my issue):</p>
  
  <pre><code>C:\Users\&lt;userName&gt;\SDK\Bin&gt;CrmSvcUtil.exe 
  /out:\Xrm003.cs 
  /url:http://&lt;url_for_server&gt;/&lt;organization_name&gt;/XRMServices/2011/Organization.svc
  /domain:"&lt;domain_name&gt;" /username:"&lt;username&gt;" /password:"&lt;password&gt;" 
  /namespace:&lt;desired_namespace_name&gt; /serviceContextName:XrmServiceContext
  </code></pre>
  
  <p><strong>Conclusion:</strong> </p>
  
  <p>I had following in my command which was causing issue that I have mentioned in my Q:  </p>
  
  <pre><code>/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,    
  Microsoft.Xrm.Client.CodeGeneration"
  </code></pre>
  
  <p>My issue was resolved just by removing it.</p>