Fixing runtime info middleware on coreclr
Fixes: https://github.com/aspnet/Diagnostics/issues/108
This commit is contained in:
parent
14ee7abf22
commit
7f83cc4e99
|
|
@ -1,15 +1,13 @@
|
||||||
// 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;
|
using System.Reflection;
|
||||||
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.Runtime;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using Microsoft.Framework.Internal;
|
using Microsoft.Framework.Internal;
|
||||||
|
using Microsoft.Framework.Runtime;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Diagnostics
|
namespace Microsoft.AspNet.Diagnostics
|
||||||
{
|
{
|
||||||
|
|
@ -64,11 +62,12 @@ namespace Microsoft.AspNet.Diagnostics
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetRuntimeVersion()
|
private string GetRuntimeVersion()
|
||||||
{
|
{
|
||||||
var klr = Assembly.Load(new AssemblyName("dnx.host"));
|
var version = _libraryManager
|
||||||
var version = klr.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
.GetType().GetTypeInfo().Assembly
|
||||||
|
.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
||||||
return version?.InformationalVersion;
|
return version?.InformationalVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue