Return fileversion for FrameworkDescription.
authorLakshmi Priya Sekar <lasekar@microsoft.com>
Wed, 29 Jun 2016 21:16:38 +0000 (14:16 -0700)
committerLakshmi Priya Sekar <lasekar@microsoft.com>
Thu, 7 Jul 2016 22:25:36 +0000 (15:25 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/a8bfaf8c9232c46aee94f0595073877bf6531aac

src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj
src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs
src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/project.json
src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/project.json

index 5ae30b8..0d6e2bd 100644 (file)
@@ -12,7 +12,7 @@
     <AssemblyName>System.Runtime.InteropServices.RuntimeInformation</AssemblyName>
     <AssemblyVersion>4.0.1.0</AssemblyVersion>
     <ProjectGuid>{F9DF2357-81B4-4317-908E-512DA9395583}</ProjectGuid>
-    <PackageTargetFramework Condition="'$(PackageTargetFramework)' == ''">netstandard1.1</PackageTargetFramework>
+    <PackageTargetFramework Condition="'$(PackageTargetFramework)' == ''">netstandard1.5</PackageTargetFramework>
     <DefineConstants Condition="'$(TargetGroup)'=='net45'">net45</DefineConstants>
     <DefineConstants Condition="'$(TargetGroup)'=='wpa81'">wpa81</DefineConstants>
     <DefineConstants Condition="'$(TargetGroup)'=='win8'">win8</DefineConstants>
index d7d85c1..76a0d48 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Reflection;
+using System.Diagnostics;
 
 namespace System.Runtime.InteropServices
 {
@@ -22,7 +23,7 @@ namespace System.Runtime.InteropServices
         {
             get
             {
-                return s_frameworkDescription ?? (s_frameworkDescription = $"{FrameworkName} {typeof(object).GetTypeInfo().Assembly.GetName().Version}");
+                return s_frameworkDescription ?? (s_frameworkDescription = $"{FrameworkName} {FileVersionInfo.GetVersionInfo(typeof(object).GetTypeInfo().Assembly.Location).FileVersion}");
             }
         }
     }
index 211d92a..8650555 100644 (file)
@@ -2,14 +2,15 @@
   "dependencies": {
     "Microsoft.NETCore.Platforms": "1.0.1",
     "System.Diagnostics.Debug": "4.0.0",
-    "System.Reflection": "4.0.0",
+    "System.Reflection": "4.1.1-beta-24229-02",
     "System.Resources.ResourceManager": "4.0.0",
     "System.Runtime": "4.0.0",
     "System.Runtime.InteropServices": "4.0.0",
-    "System.Threading": "4.0.0"
+    "System.Threading": "4.0.0",
+    "System.Diagnostics.FileVersionInfo":  "4.0.0"
   },
   "frameworks": {
-    "netstandard1.1": {
+    "netstandard1.5": {
       "dependencies": {},
       "imports": [
         "dotnet5.2"
index ece93c1..3e47bee 100644 (file)
@@ -4,6 +4,7 @@
 
 using System.Runtime.InteropServices;
 using System.Reflection;
+using System.Diagnostics;
 using Xunit;
 
 namespace System.Runtime.InteropServices.RuntimeInformationTests
@@ -13,7 +14,7 @@ namespace System.Runtime.InteropServices.RuntimeInformationTests
         [Fact]
         public void VerifyRuntimeDebugName()
         {
-            string expected = string.Format(".NET Core {0}", typeof(object).GetTypeInfo().Assembly.GetName().Version);
+            string expected = string.Format(".NET Core {0}", FileVersionInfo.GetVersionInfo(typeof(object).GetTypeInfo().Assembly.Location).FileVersion);
             Assert.Equal(expected, RuntimeInformation.FrameworkDescription);
             Assert.Same(RuntimeInformation.FrameworkDescription, RuntimeInformation.FrameworkDescription);
         }
index 39966f4..1cae1e6 100644 (file)
@@ -12,7 +12,8 @@
       "exclude": "compile"
     },
     "Microsoft.xunit.netcore.extensions": "1.0.0-prerelease-00508-01",
-    "Microsoft.DotNet.BuildTools.TestSuite": "1.0.0-prerelease-00520-02"
+    "Microsoft.DotNet.BuildTools.TestSuite": "1.0.0-prerelease-00520-02",
+    "System.Diagnostics.FileVersionInfo": "4.0.0"
   },
   "frameworks": {
     "netstandard1.3": {}