1. 11 10月, 2014 1 次提交
    • T
      Remove duplicate package references. · 8fef5b5d
      tmeschter 提交于
      When our projects were last updated to a newer version of Microsoft.Net.ToolsetCompilers, NuGet didn't replace the old version--it just put the new version next to it. Every project ended up referencing both versions, and which set of compiler binaries "won" depended on the order they appeared in the project file. So different projects built with different compilers.
      
      This change strips out all references to the old version. (changeset 1352054)
      8fef5b5d
  2. 10 10月, 2014 4 次提交
  3. 09 10月, 2014 4 次提交
  4. 08 10月, 2014 1 次提交
  5. 07 10月, 2014 7 次提交
    • T
      Merges MetadataReferenceProvider and MetadataReferenceResolver into a single type. · 7fa0b8fc
      TomasMatousek 提交于
      Previously the user had to pass both of these objects to CompilationOptions and the compiler had to call first the resolver to resolve the path specified in #r:
      
      string ResolveReference(string reference, string baseFilePath)
      
      and then the provider to create the reference:
      
      PortableExecutableReference GetReference(string resolvedPath, MetadataReferenceProperties properties)
      
      With this change the compiler simply calls on MetadataReferenceResolver:
      
      ImmutableArray<PortableExecutableReference> ResolveReference(string reference, string baseFilePath, MetadataReferenceProperties properties)
      
      Notice that now the resolver may return multiple references. This is needed to support #r of NuGet packages.
      
      We used reference resolvers and providers in many ways for multiple purposes. I left behind the metadata file resolvers and providers to avoid making too many changes, but made them internal. In some cases the usage is legitimate, but still an implementation detail. More cleanup will also be possible once we remove the old scripting API. For now I have worked around all these dependencies.
       (changeset 1349333)
      7fa0b8fc
    • M
      Add telemetry for FixAllOccurrences. (changeset 1349284) · e69b89d5
      manishv 提交于
      e69b89d5
    • J
      Make much of the Workspaces layer Portable. · e76a29a4
      jasonmalinowski 提交于
      This change splits the Workspaces layer into two parts, mirroring the Portable/Desktop split that the compilers did. The core parts of the Workspaces layer (managing documents and projects, formatting, some refactoring, code fixes) is kept in the portable subset, with a few non-portable pieces remaining, notably MSBuild support.
      
      This change has a major impact on how MEF now works in Roslyn. Traditional MEF (“MEFv1”) is not portable, and so we must move the Workspaces layer over to using the Microsoft.Composition NuGet package (“MEFv2”) which is. The APIs are distinct in that each has its own namespace, but the concepts are more or less identical. It requires some care though: the workspaces layer is simple in that it only references MEFv2, but higher layers have to reference both versions to use metadata attributes. Exports using metadata attributes from the editor (say, ContentTypeAttribute) must use MEFv1 attributes to export, whereas exports for the workspaces layer must use MEFv2 attributes. The rule is subtle and yet simple, and so a diagnostic is provided which catches any offenses to prevent confusion.
      
      This also has some impact in how we create MEF hosts: if you wish to host just the base workspaces layer, we can use MEFv2 to compose everything. The HostServices implementation (MefV1HostServices) that consumes a MEFv1 ExportProvider. If you’re in Visual Studio, you can use this implementation to get the full set of host services provided in Visual Studio.
      
      Otherwise, most of the changes in here are minor: we react to some APIs that have been moved/renamed in the portable subset we are targeting, and also align our various exception helper utilities with the compiler’s precedent. (changeset 1349276)
      e76a29a4
    • T
      Decouple Workspace metadata provider from compiler metadata provider. · d0ea0869
      TomasMatousek 提交于
      The service no longer derives directly from MetadataReferenceProvider. Instead the service exposes API to get metadata references and an instance of compiler reference provider. (changeset 1349108)
      d0ea0869
    • H
      4cbd636d
    • C
    • T
      Introduces EmitOptions for options passed to Compilation.Emit(). · 1621a00f
      TomasMatousek 提交于
           Moves options that were previously on CompilationOptions but were not used until emit phase to EmitOptions: fileAlignment, baseAddress, highEntropyVirtualAddressSpace, subsystemVersion, runtimeMetadataVersion. They hold on values written to various PE headers. We can now easily add other similar PE flags to EmitOptions, which is a common customer request, without affecting code that works with compilation options in other layers (workspaces, project system, etc.).
      
           Removes EmitMeadataOnly method and instead adds a MetadataOnly flag to EmitOptions. Removes MetadataOnlyEmitOptions - they were not used and can now be easily added as bools to EmitOptions.
      
           Moves pdbFilePath and outputName from parameters of Emit to EmitOptions.
      
      IDE: remove tracking of options that were moved to EmitOptions, since the IDE doesn't care about options that don't affect compilation. (changeset 1348623)
      1621a00f
  6. 06 10月, 2014 5 次提交
  7. 05 10月, 2014 3 次提交
  8. 04 10月, 2014 7 次提交
    • H
      wait up to 5 seconds on VS shutdown to give grace period to shutdown solution... · cc87ac0f
      heejaechang 提交于
      wait up to 5 seconds on VS shutdown to give grace period to shutdown solution cralwer. otherwise, some async method of solution cralwer might in the middle of running even after shutdown process started. (changeset 1348118)
      cc87ac0f
    • D
      Bugfixes 991528 and 1038018 Respecting encoding settings · 400ce23a
      dpoeschl 提交于
      Bugfix 991528 "[CodePlex] Persisting Documents with MSBuildWorkspace.TryApplyChanges doesn't respect existing encoding"
      
      Pass the CodePage MSBuild property to our MSBuildWorkspace instead of defaulting to the system default encoding. If the CodePage is 0 or missing, we default to UTF8.
      
      Bugfix 1038018 "Inline rename causes unrelated edits in files with unicode characters"
      
      The TextBufferTextFactory now prefers encodings in the following order:
           - UTF8/Unicode/BigEndianUnicode if the byte order mark is present
           - The specified default codepage/encoding in the project file
           - UTF8 without a byte order mark
           - The system default encoding (changeset 1348078)
      400ce23a
    • M
    • H
      removed diagnostic code I had put into workspace to figure out MEF issues. it... · af9763aa
      heejaechang 提交于
      removed diagnostic code I had put into workspace to figure out MEF issues. it is no longer needed. no fix yet though. (changeset 1347829)
      af9763aa
    • B
      Bugfix 1036954 : Compiler only expects IOException and BadImageFormatException... · d20c2155
      Basoundr_ms 提交于
      Bugfix 1036954 : Compiler only expects IOException and BadImageFormatException coming out of PortableExecutableReference.GetMetadata.
      
      Any other exception (like UnauthorizedAccessException) needs to be wrapped into IOException, unless it already derives from IOException.
           VisualStudioMetadataReferenceManager.GetStorageInfoFromTemporaryStorage directly calls File.Open which may throw all sorts of exceptions.
      
      The fix is to call FileUtilities.OpenStream which wraps the exceptions properly
      
      Since this is behavior expected any where in the product, the APIs Open, Create have now been wrapped with the helpers to generate the IOException instead of some random exception. (changeset 1347659)
      d20c2155
    • A
      C#: Changing BaseListSyntax to contain a list of BaseTypeSyntax nodes rather... · fd4cf5dc
      AlekseyTs 提交于
      C#: Changing BaseListSyntax to contain a list of BaseTypeSyntax nodes rather than a list of TypeSyntax nodes. (changeset 1347630)
      fd4cf5dc
    • R
      I am adding telemetry to Roslyn to collect information regarding analyzers... · ec281063
      RoslynTeam 提交于
       I am adding telemetry to Roslyn to collect information regarding analyzers which crash. This is to get answers for questions like
           - What are the top 10 analyzers which crash the most often in a VS Session?
           - What exceptions do they crash with?
           - What kind (symbol, syntaxtree) of analyzers crash often?
      
           DiagnosticAnalyzerDriver.cs - Log the analyzer and the exception details when there is a crash.
           DiagnosticAnalyzerLogger.cs - Logic to aggregate the analyzers crash details and post the summary as telemetry event.
           SolutionCrawlerLogger.cs - Log the analyzer crash summary during shutdown.
           HashAlgorithms.cs - Some style cop changes. (changeset 1347620)
      ec281063
  9. 03 10月, 2014 2 次提交
    • R
      This change enables TypeScript to participate in the settings infrastructure... · 78834998
      RoslynTeam 提交于
      This change enables TypeScript to participate in the settings infrastructure in Roslyn, the immediate requirement is to enabe the ability to enable/disable the Navigation bar, but in the future this will be used for more/other features. (Brace macthing comes to mind).
      
      To minimize the impact I made the following changes:
           - Add an IVT to the ServicesVisualStudioImpl project, this makes the AbstractLanguageSettingsSerializer visible to TypeScript
           - Move the internal class ExportLanguageSpecificOptionSerializerAttribute and ExportOptionSerializerAttribute  to the ServicesVisualStudio project.
           - Fix up namespaces and references to those namespaces
      ***NO_CI***
       (changeset 1347128)
      78834998
    • D
      Core C# IDE Support for string interpolation · 0af01e3d
      dustincampbell 提交于
      The following features have been updated to support interpolated strings:
      
      * Classification - start, mid, and end tokens of an interpolated string are now classified as strings.
      
      * Formatting - the formatter no longer adds spaces before and after insert "holes" in interpolated strings.  From an IDE design perspective, we've decided to not enforce any spacing rules because it's possible that a user may want no spacing for a simple or dotted name (e.g. "\{name}") but *would* want spacing for more complex expressions.
      
      * Completion List - the position after a start or mid token is now considered an expression context, so the completion list appears as expected.
      
      * Automatic Brace Completion - Typing \{ will complete the closing } in standard brace completion scenarios. It will not complete when going back to edit a string unless the edit happens at the end of the line. This is consistent with how brace completion works in general. (We'll need a platform change to do otherwise.)
      
      * Brace Matching - \{ and } braces are highlighted in the editor when the caret is at the start or end of them respectively. (changeset 1346881)
      0af01e3d
  10. 02 10月, 2014 6 次提交
    • H
      a place where race happens is down to the point where we get MEF services from ExportProvider. · 06d641eb
      heejaechang 提交于
      removed all other diagnostic instrument code except the ponit where we get MEF services from ExportProviders.
       (changeset 1346356)
      06d641eb
    • D
      Bugfix 1037992 "LockRecursionException on linked file close" and 1039084... · 54e86c47
      dpoeschl 提交于
      Bugfix 1037992 "LockRecursionException on linked file close" and 1039084 "Closing a shared document tab may cause the shared item context hierarchy to switch"
      
      Bug 1037992 "LockRecursionException on linked file close" - The workspace's OnDocumentClosed method may need to pick a new active context document and alert appropriate hierarchy of the change. Doing so may cause us to be called back via OnDocumentContextUpdated while still holding the serialization lock. We now alert the appropriate hierarchy of the active context change outside of OnDocumentClosed's serialization lock.
      
      Bugfix 1039084 "Closing a shared document tab may cause the shared item context hierarchy to switch" - In the Workspace's OnDocumentClosed method, we were lacking enough context to distinguish between cases where just one of a set of linked/shared files was closed (e.g. excluding a linked file from one of its owning projects or unloading one of the head projects for a shared project) and cases where the entire set of linked/shared files was closed (e.g. closing the tab of a shared document). In the former case, we need to pick a new active context document and alert the outside world (setting SharedItemContextHierarchy or calling TransferItem) so that the open tab updates correctly and the we stay in sync with the containing hierarchies. In the latter case, we must not alert the outside world between individual document closes.
      
      We now distinguish between these cases in OnDocumentClosed. The DocumentProvider decides the updateActiveContext flag by whether or not multiple documents are being closed at once. If multiple documents are being closed, it assumes all documents are being closed and chooses not to update the active context. (changeset 1346228)
      54e86c47
    • B
      Bugfix 771761 - Format #region and #endregion when both typing and committing from completion list · a1fc0351
      Basoundr_ms 提交于
      Bugfix 608827 - CR (changeset 1346106)
      a1fc0351
    • V
      Bugs 1026593, 1026595: Set DtdProcessing = DtdProcessing.Prohibit, XmlResolver... · 3c19b030
      vladres 提交于
      Bugs 1026593, 1026595: Set DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null for all XML processing. Also fixes minor typos and redundant code. (changeset 1346103)
      3c19b030
    • H
      don't crash VS on fatal error on esent (fatal errors include things such as... · 53189bd4
      heejaechang 提交于
      don't crash VS on fatal error on esent (fatal errors include things such as out of disk space, log file got corrupted by other process and etc).
      
      in these cases, we will recover the issue by using memory cache. (changeset 1346037)
      53189bd4
    • D
      Make DocumentInfo.DefaultEncoding internal until we have a strong reason to... · 8daffb57
      dpoeschl 提交于
      Make DocumentInfo.DefaultEncoding internal until we have a strong reason to make it public. (changeset 1346025)
      8daffb57