Revert "Fixing runtime info middleware on coreclr"

This reverts commit 7f83cc4e99.
This commit is contained in:
Praburaj 2015-04-15 13:55:21 -07:00
parent 5a289a2c9b
commit 1c648fa905
1 changed files with 8 additions and 7 deletions

View File

@ -1,13 +1,15 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // 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. // 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 System.Threading.Tasks;
using Microsoft.AspNet.Builder; using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics.Views; using Microsoft.AspNet.Diagnostics.Views;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.Framework.Internal;
using Microsoft.Framework.Runtime; using Microsoft.Framework.Runtime;
using System.Linq;
using System.Reflection;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Diagnostics namespace Microsoft.AspNet.Diagnostics
{ {
@ -62,11 +64,10 @@ namespace Microsoft.AspNet.Diagnostics
return model; return model;
} }
private string GetRuntimeVersion() private static string GetRuntimeVersion()
{ {
var version = _libraryManager var klr = Assembly.Load(new AssemblyName("dnx.host"));
.GetType().GetTypeInfo().Assembly var version = klr.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
return version?.InformationalVersion; return version?.InformationalVersion;
} }
} }