• J
    Standardize our test references (#45690) · 6ebca394
    Jared Parsons 提交于
    This change standardizes the reference assemblies we use for compilation in our unit test to be the actual .NET Framework reference assemblies. 
    
    Prior to this change they were a mix of reference and implementation assemblies from non-RTM versions of the .NET Framework. In order to map the existing assemblies to their respective target framework version I worked with the servicing team and we mapped them to the closest possible TFM based on their file versions. The bulk of the change is essentially mechanically moving from names like `mscorlib.v4_30319_17929` to `Net451.mscorlib`.
    
    Unfortunately in several cases the non-RTM assemblies didn't cleanly map to a RTM TFM. This was particularly problematic when migrating the `v4_30319` references as this is a mix of a `net40` and `net451` versions. This caused issues in our code base because these references were freely mixed with actual `net40` and `net451` references in the code base. Most of the time this went unnoticed because the test didn't expose the gaps in the APIs. In a lot of cases though, particularly when mixing a version of `System.Core` that did or didn't have `ExtensionsAttribute`, this required some manual inspection on my part and a fix. In pretty much every case this was a straight forward fix but it did mean the change was less mechanical than I would have preferred.
    
    To make this change easier to review I've broken it up into three commits:
    
    1. The actual changes to `Roslyn.Test.Utilities` that move us to the new references.
    1. The changes to our test code which required more than a simple straight forward reference update or explicitly involved retargetting code. These are changes I think deserve stronger scrutiny than the more mechanical aspects of this PR.
    1. The mechanical changes to move from the old references to the new ones. This is the bulk of the change but is for the most part renames. 
    
    The benefits of this change are the following:
    
    1. Have our test more closely mirror customer scenarios by using official reference assemblies.
    1. Improve the readability of the tests by referring to assemblies by their target framework, which is familiar to most developers, instead of their file version, which is familiar to servicing team only.
    1. Reduces the build output size of Roslyn by **~5GB**
    
    The internal PR is here https://github.com/dotnet/roslyn-internal/pull/1954
    
    Note: I will be making more changes in this area in future PRs. But I wanted to keep the mechanical portion of this change into its own PR. Further PRs will be smaller but less mechanical. 
    6ebca394
Versions.props 23.1 KB