Switching to generations TFMs

This commit is contained in:
Pranav K 2015-10-22 00:20:57 -07:00
parent 2e884f20f7
commit 20f90e9879
7 changed files with 109 additions and 99 deletions

View File

@ -5,10 +5,12 @@
"type": "git", "type": "git",
"url": "git://github.com/aspnet/diagnostics" "url": "git://github.com/aspnet/diagnostics"
}, },
"compilationOptions": { "warningsAsErrors": true }, "compilationOptions": {
"warningsAsErrors": true
},
"frameworks": { "frameworks": {
"dnx451": { }, "net451": {},
"dnxcore50": { "dotnet5.4": {
"dependencies": { "dependencies": {
"System.Runtime": "4.0.21-beta-*", "System.Runtime": "4.0.21-beta-*",
"System.Resources.ResourceManager": "4.0.1-beta-*" "System.Resources.ResourceManager": "4.0.1-beta-*"

View File

@ -1,5 +1,5 @@
using System; using System;
#if DNX451 #if NET451
using System.Runtime.Remoting; using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging; using System.Runtime.Remoting.Messaging;
#else #else
@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Diagnostics.Elm
public ScopeNode Node { get; set; } public ScopeNode Node { get; set; }
#if DNX451 #if NET451
private static string FieldKey = typeof(ElmScope).FullName + ".Value"; private static string FieldKey = typeof(ElmScope).FullName + ".Value";
public static ElmScope Current public static ElmScope Current
{ {

View File

@ -10,12 +10,14 @@
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*" "Microsoft.Extensions.Logging.Abstractions": "1.0.0-*"
}, },
"frameworks": { "frameworks": {
"dnx451": { }, "net451": {},
"dnxcore50": { "dotnet5.4": {
"dependencies": { "dependencies": {
"System.Threading": "4.0.11-beta-*" "System.Threading": "4.0.11-beta-*"
} }
} }
}, },
"compileExclude": ["Views/*.cshtml"] "compileExclude": [
"Views/*.cshtml"
]
} }

View File

@ -6,7 +6,7 @@ using Microsoft.AspNet.Diagnostics.Entity.Utilities;
using Microsoft.Data.Entity.Storage; using Microsoft.Data.Entity.Storage;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
#if DNXCORE50 #if DOTNET5_4
using System.Threading; using System.Threading;
#else #else
using System.Runtime.Remoting.Messaging; using System.Runtime.Remoting.Messaging;
@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity
{ {
public class DataStoreErrorLogger : ILogger public class DataStoreErrorLogger : ILogger
{ {
#if DNXCORE50 #if DOTNET5_4
private readonly AsyncLocal<DataStoreErrorLog> _log = new AsyncLocal<DataStoreErrorLog>(); private readonly AsyncLocal<DataStoreErrorLog> _log = new AsyncLocal<DataStoreErrorLog>();
#else #else
private const string ContextName = "__DataStoreErrorLog"; private const string ContextName = "__DataStoreErrorLog";
@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity
{ {
get get
{ {
#if DNXCORE50 #if DOTNET5_4
return _log.Value; return _log.Value;
#else #else
return (DataStoreErrorLog)CallContext.LogicalGetData(ContextName); return (DataStoreErrorLog)CallContext.LogicalGetData(ContextName);
@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity
// it will not be available to code outside of the current async context. // it will not be available to code outside of the current async context.
// We create it ahead of time so that any cloning just clones the reference // We create it ahead of time so that any cloning just clones the reference
// to the object that will hold any errors. // to the object that will hold any errors.
#if DNXCORE50 #if DOTNET5_4
_log.Value = new DataStoreErrorLog(); _log.Value = new DataStoreErrorLog();
#else #else
CallContext.LogicalSetData(ContextName, new DataStoreErrorLog()); CallContext.LogicalSetData(ContextName, new DataStoreErrorLog());

View File

@ -66,7 +66,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity
try try
{ {
#if !DNXCORE50 #if !DOTNET5_4
// TODO This probably isn't the correct place for this workaround, it // TODO This probably isn't the correct place for this workaround, it
// needs to be called before anything is written to CallContext // needs to be called before anything is written to CallContext
// http://msdn.microsoft.com/en-us/library/dn458353(v=vs.110).aspx // http://msdn.microsoft.com/en-us/library/dn458353(v=vs.110).aspx

View File

@ -12,15 +12,17 @@
"Microsoft.AspNet.Diagnostics": "1.0.0-*", "Microsoft.AspNet.Diagnostics": "1.0.0-*",
"EntityFramework.Relational": "7.0.0-*" "EntityFramework.Relational": "7.0.0-*"
}, },
"compile": [ "..\\Shared\\*.cs" ], "compile": [
"..\\Shared\\*.cs"
],
"frameworks": { "frameworks": {
"dnx451": { "net451": {
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Configuration": "", "System.Configuration": "",
"System.Threading.Tasks": "" "System.Threading.Tasks": ""
} }
}, },
"dnxcore50": { "dotnet5.4": {
"dependencies": { "dependencies": {
"System.Threading": "4.0.11-beta-*" "System.Threading": "4.0.11-beta-*"
} }

View File

@ -17,16 +17,20 @@
"System.Diagnostics.DiagnosticSource": "4.0.0-beta-*" "System.Diagnostics.DiagnosticSource": "4.0.0-beta-*"
}, },
"frameworks": { "frameworks": {
"dnx451": { "net451": {
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Runtime": "" "System.Runtime": ""
} }
}, },
"dnxcore50": { "dotnet5.4": {
"dependencies": { "dependencies": {
"System.Reflection.Extensions": "4.0.1-beta-*" "System.Reflection.Extensions": "4.0.1-beta-*"
} }
} }
}, },
"compileExclude": ["DeveloperExceptionPage/Views/*.cshtml", "RuntimeInfo/Views/*.cshtml", "WelcomePage/Views/*.cshtml"] "compileExclude": [
"DeveloperExceptionPage/Views/*.cshtml",
"RuntimeInfo/Views/*.cshtml",
"WelcomePage/Views/*.cshtml"
]
} }