Move a few types back to the portable layer to allow a CustomWorkspace to be produced without needing the desktop layer.

As part of this, I split apart ITemporaryStorageService's ITemporaryStorage into two separate types, so it's clear whether you're storing text or storing binary streams. The merged implementation allowed some leakage of implementation details. (changeset 1353513)
Fix for bug 1048368: Suppressing/escalating user diagnostics through project property pages isn't reflected in live errors

Fix assumptions about warnaserror and nowarn ID value being integers at bunch of places in Roslyn code. (changeset 1353758)
Currently, we have a many to many mapping between diagnostics reported in a given span and code fixes available for these diagnostics. For example, it is legal for a code fix provider to return two fixes to handle three diagnostics in a given span and we currently have no way to map from the fixes returned from a provider back to the diagnostics that each fix is supposed to handle (the CodeAction for a fix doesn't know which diagnostic it is fixing)

The light bulb menu item (SuggestedAction) for a fix therefore doesn't have a definitive way to identify which diagnostic the menu item is fixing. Instead each SuggestedAction holds on to a collection of diagnostics and it could be fixing any diagnostic in the collection. In the preview pane header for a particular menu item, we currently display details about the 'first' diagnostic in the collection. Most of the time this works fine because most of the time we only have a single diagnostic in any given span. However this breaks anytime we have more than one diagnostic in a given span and we end up showing the wrong headers for our preview panes in such cases.

This fix changes code fix providers to always accept a single diagnostic as input (instead of a collection) and return a list of fixes for this single diagnostic (i.e. have one to many mapping from diagnostic to fixes). The host now passes one diagnostic at a time to each provider which returns set of fixes for each diagnostic. This allows the host to maintain a mapping from diagnostic to fixes and display this mapping to the end user (in the preview pane header) + also makes the API less confusing for the author of the fix provider. (changeset 1353855)
Bugfix 1040669 - Re-enable OptionPagesDTE

Fixes a couple options that were not being serialized to the registry and adds several OptionProviders to enumerate options in portable projects that are no longer exported, allowing us to properly reset all options to their default values during integration tests. (changeset 1353921)
PERF: TryReadByteOrderMark allocs
Stream.ReadByte() allocates a byte[1] each time. This change uses a thread-local allocation to avoid that allocation. (changeset 1354061)
Hide events and property backing fields from the expression-level completion list (changeset 1354088)
VB: Initial implementation of parsing and binding for NameOf operator. (changeset 1354360)
Removed code from MSBuildWorkspace that was trying to support adding/removing additional documents.

Moved default host services logic from MSBuildWorkspace to new type DesktopMefHostServices type.

Changed CommandLineProject to make workspace parameter optional. You only need to specify workspace if want to override behavior of some of the services (beyond default).

Added WorkspaceServices.GetRequiredService and LanguageServices.GetRequiredService API that throws InvalidOperationException if service is not available.

Changed Workspace.AddDocument and Workspace.AddAdditionalDocument to take DocumentInfo instead of multiple parameters (for future proofing signature.)

Added ApplyChangesKind enum values for analyzers and additional documents

Changed Workspace TryApplyChanges to check for all unsupported changes before starting to apply.
Changed separate *apply* methods to default to calling equivalent OnXXX method instead of throwing.

Changed CustomWorkspace.CanApplyChanges to default to true for all kinds.
Added error messages for each ApplyChangesKind

Added missing WithXXX methods from DocumentInfo (changeset 1354869)
Update assert in TypeUnification.CanUnify for substitutions from type parameter to type parameter (changeset 1354882)
FIx for bug 1038237: Incorrect warnings in Error List for #pragma warning disable'd code with Closed File Diagnostics enabled

The issue here is that root of the syntax trees recovered from temporary storage stream didn't have the ContainsDirective flag set, even when it had pragma directives. Hence, while computing diagnostics for closed files, we intermittently see diagnostics which have been suppressed by pragma directives appear in the error list.
Fix is to ensure that the stream based constructor for DirectiveTriviaSyntax node has this flag set, just like it's other constructors. (changeset 1355099)
Fix for bug 1046530: Should the strings in Microsoft.CodeAnalysis.DiagnosticFormatter.GetMessagePrefix be localized?

Localize the diagnostic severity in DiagnosticFormatter.GetMessagePrefix. (changeset 1355104)
Replace checked-in analyzers with the the new Microsoft.Net.RoslynDiagnostics NuGet package.

This also updates Microsoft.Net.ToolsetCompiler to the corresponding version. (changeset 1355122)
1043693-Preserve surrounding trivia when rescanning an interpolated string (changeset 1355217)
1043693-Correct bug in previous checkin. (changeset 1355628)
Move FailFast class from CodeAnalysis.Desktop -> CodeAnalysis (Portable)...

I think that at one point, it contained Win32 API calls that were not portable, but that is not the case now.  Moving it alongside FatalError simplifies project authoring (fewer linked files and aliases). (changeset 1355678)
Roll BasicCodeAnalysisRoslynDiagnosticAnalyzers into BasicRoslynDiagnosticAnalyzers.

The former assembly contains a single diagnostic, BasicUseSiteDiagnosticsCheckEnforcer, that only applies to the BasicCodeAnalysis (Portable) project. Currently, we do some MSBuild magic to prevent other assemblies from picking up that analyzer when they consume the Microsoft.Net.RoslynDiagnostics NuGet.

The right way to do this is to have one analyzer assembly for VB diagnostics, and have this particular diagnostic be off by default. BasicCodeAnalysis.vbproj gains a rule set file which turns it back on.

A subsequent change will actually delete the now empty BasicCodeAnalysisRoslynDiagnosticAnalyzers project, and another will move us forward to a newer version of Microsoft.Net.RoslynDiagnostics that includes this change. (changeset 1355761)
Change FileTextLoader to open FileStream for asynchronous IO. (changeset 1355769)
CallerLineNumber value was set to beginning of expression rather than method name (changeset 1355770)
Don't suggest is or as inside interpolated strings.
 (changeset 1355776)
Delete BasicCodeAnalysisRoslynDiagnosticAnalyzers.vbproj. This project is now empty. (changeset 1355874)