When the encoding explicitly passed to EncodedStringText ctor is different from the encoding specified by BOM in the stream, we should use that latter.

The new behavior matches StreamReader behavior. Previously the optimized path in Decode produced different results in this case. (changeset 1256457)
made analyzer file reference to report ReflectionTypeLoadException as a diagnostic rather than throwing an exception.

this could happen when creating diagnostic analyzer through reflection encountered problem such as missing dependency and etc. (changeset 1256510)
Removes per-method body state from PEWriter.  (changeset 1257070)
These are a set of additional test for bug 944832 (changeset 1257488)
Fix issues with VB Enum preselection (changeset 1258398)
Moves code that emits debug info to PdbWriter and cleans up PeWriter.

Also removes unnecessary buffer allocation for metadata tables and unnecessary method body index dictionary. (changeset 1258587)
Make sure to reference MSBuild assemblies that match the version of VS being used to build. (changeset 1259014)
Refactor VB ObjectDisplay/SymbolDisplay

* move code that depends on ISymbol -> SymbolDisplay
* move VbStringDisplay code from Core -> VisualBasic (since VB now supports Iterators) (changeset 1259308)
Remove superfluous sequence points from VB using

This removes superfluous sequence points for VB Using statements including <using expression> and <using "single" declaration>cases. (changeset 1259940)
#872954: Missing error "CS0523: Struct member '...' causes a cycle in the struct layout" for nested enum (changeset 1259966)
C#: Initial implementation for "Initialization Scope". (changeset 1260301)
Stores Encoding on SourceText so that we can always calculate checksum of the underlying binary data, even if the SourceText wasn’t created from a Stream.

Adds WithRootAndOptions and WithFilePath methods to SyntaxTree and implements them for all subclasses. I decided to merge WithRoot and WithOptions to a single method WithRootAndOptions since setting one without the other doesn't make much sense (the options should correspond to the root node).

Propagates the Encoding throughout workspaces and services.
Refactors recoverable syntax trees so that they can implement With* methods.

Allow encoding on SourceText to be unspecified (null) and report an emit diagnostic when attempting to emit debug information for a syntax tree that is backed by encoding-less source text. If user creates a syntax tree from a string they previously read from a file and then try to emit debuggable compilation with such tree the original encoding of the file might not match the default UTF8 (they might different by presence of BOM, which is quite subtle). To avoid confusion we don't set UTF8 encoding by default. Instead we report the diagnostic and the user needs to explicitly provide an encoding to the syntax tree factory method.

Avoid leaking DecoderFallbackException out of EncodedStringText.Create. Throw InvalidDataException instead to reduce the amount of exceptions that the caller needs to deal with.

Also moves HasSameText extension method from Services to SourceText and optimizes the comparison for the case we the SHA1 checksums are available.
 (changeset 1260412)
Story 942568

Introduce option to prefer intrinsic type keyword over expanded type. The default option is to prefer the intrinsic keyword

     Eg:
     1. With the option enabled[default]
     class Program
     {
         private int _member;
         static void M(int argument)
         {
             int local;
         }
     }

     2. With option disabled
     class Program
     {
         private System.Int32 _member;
         static void M(System.Int32 argument)
         {
             System.Int32 local;
         }
     } (changeset 1260681)
Update the XML schema for rule set files to catch more duplicate rules.

     Before reading the contents of a .ruleset file, we validate it against a schema. This catches common problems, such as duplicate rule definitions.

     The issue here is that we will currently catch this:

     <Rules ... >
       <Rule Id="CA1011" Action="Warn" />
       <Rule Id="CA1011" Action="Error" />
     </Rules>

     but not this:

     <Rules ... >
       <Rule Id="CA1011" Action="Warn" />
     </Rules>
     <Rules ... >
       <Rule Id="CA1011" Action="Error" />
     </Rules>

     That is, the schema only enforces that a Rule is unique within a Rules element, not that it is unique across the whole ruleset. This causes a later compiler crash when we attempt to set the action for rule CA1011 and find that it has already been set.

     The fix here is to update the schema file to enforce uniqueness across the file. (changeset 1260974)
Add zero-th entries to heaps even for delta metadata to avoid nil generation-relative handles, which are technically ok but confusing. (changeset 1260989)
Preselect types and members based on the <completionlsit> documentation comment tag. (changeset 1261004)
Fixed overflow in ObjectWriter and added a unit test for it. (changeset 1261029)
Small allocation gains for the VB typing scenario. (changeset 1261118)
Adjust Sequence Points for C# Using to align with Break Points

The sequence point used to be on the "using" keyword while the break point spans around both "using" keyword and the expression. Here, we adjust sequence points to be aligned with break points. Also, we update unittests in a way that the markup can be used to identify a specific span which is verified. (changeset 1261135)
C#: Adjust implementation of Primary Constructors to match current language design:
- Disallow field modifiers and field attributes on primary constructor parameters.
- Adjust scope of primary constructor parameters.
- Allow referencing non-ref/non-out primary constructor parameters in a lambda.
- Report appropriate diagnostics when a primary parameter is shadowed in a nested scope.
 (changeset 1261399)