示例#1
0
        public void EnsureCorrectVisualStudioVersion()
        {
            var count = 0;

            foreach (var refData in AssemblyData.GetCoreAssemblies().SelectMany(a => AssemblyData.GetTransitiveReferenceData(a)))
            {
                switch (refData.Kind)
                {
                case ReferenceKind.Editor:
                    Assert.Equal(VsVersion.MinimumSupported, refData.VsVersion);
                    break;

                case ReferenceKind.ComponentVersioned:
                case ReferenceKind.ShellVersioned:
                    Assert.True(refData.VsVersion <= VsVersion.MinimumSupported);
                    break;

                case ReferenceKind.Framework:
                case ReferenceKind.VsVim:
                    // Nothing to validate for these.
                    break;

                case ReferenceKind.ShellNonVersioned:
                    Assert.True(false, "A non-versioned assembly should never be referenced in the core assembly set");
                    break;

                case ReferenceKind.ShellPia:
                    Assert.NotNull(refData.VsVersion);
                    Assert.True(refData.VsVersion.Value <= VsVersion.MinimumSupported);
                    break;

                default:
                    throw Contract.GetInvalidEnumException(refData.Kind);
                }

                count++;
            }

            Assert.True(count >= 60);
        }
示例#2
0
 public void Ensure2019()
 {
     ValidateSpecific(VsVersion.Vs2019, AssemblyData.GetTransitiveReferenceData(AssemblyData.VsVim2019));
 }