From 1c648fa9054600bd60d068db33aba605f710d5e7 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Wed, 15 Apr 2015 13:55:21 -0700 Subject: [PATCH] Revert "Fixing runtime info middleware on coreclr" This reverts commit 7f83cc4e995683fcc73d4274171629049bd6d222. --- .../RuntimeInfoMiddleware.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.AspNet.Diagnostics/RuntimeInfoMiddleware.cs b/src/Microsoft.AspNet.Diagnostics/RuntimeInfoMiddleware.cs index 35d0fb5445..de3ee8d286 100644 --- a/src/Microsoft.AspNet.Diagnostics/RuntimeInfoMiddleware.cs +++ b/src/Microsoft.AspNet.Diagnostics/RuntimeInfoMiddleware.cs @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System.Reflection; +using System; using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Diagnostics.Views; using Microsoft.AspNet.Http; -using Microsoft.Framework.Internal; using Microsoft.Framework.Runtime; +using System.Linq; +using System.Reflection; +using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Diagnostics { @@ -62,12 +64,11 @@ namespace Microsoft.AspNet.Diagnostics return model; } - private string GetRuntimeVersion() + private static string GetRuntimeVersion() { - var version = _libraryManager - .GetType().GetTypeInfo().Assembly - .GetCustomAttribute(); + var klr = Assembly.Load(new AssemblyName("dnx.host")); + var version = klr.GetCustomAttribute(); return version?.InformationalVersion; } } -} \ No newline at end of file +}