public void TryGetVersionFromProductInfoHandlesValidInput(TargetFrameworkMoniker expectedTfm, string expectedMsBuildMoniker, string productName, string productVersion) { Assert.True(CoreRuntime.TryGetVersionFromProductInfo(productVersion, productName, out Version version)); var runtime = CoreRuntime.FromVersion(version); Assert.Equal(expectedTfm, runtime.TargetFrameworkMoniker); Assert.Equal(expectedMsBuildMoniker, runtime.MsBuildMoniker); }
[InlineData("Microsoft .NET Framework", "4.6.26614.01 @BuiltBy: dlab14-DDVSOWINAGE018 @Commit: a536e7eec55c538c94639cefe295aa672996bf9b")] // this is an actual output for 2.0 but it simply does not contain enough info public void TryGetVersionFromProductInfoHandlesInvalidInput(string productName, string productVersion) { Assert.False(CoreRuntime.TryGetVersionFromProductInfo(productVersion, productName, out _)); }