Transition to Netstandard.

- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
This commit is contained in:
N. Taylor Mullen 2016-02-26 11:11:16 -08:00
parent 12f33de92c
commit 33d1aea8ea
104 changed files with 430 additions and 210 deletions

View File

@ -12,9 +12,12 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*"
},
"frameworks": {
"net451": { },
"dnxcore50": {
"imports": "portable-net451+win8",
"net451": {},
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -13,8 +13,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -15,8 +15,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -14,8 +14,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -13,8 +13,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -13,8 +13,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -13,8 +13,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -27,8 +27,11 @@
}
},
"net451": { },
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -16,8 +16,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -21,8 +21,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -12,8 +12,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -33,13 +35,16 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-*",
"System.ComponentModel.TypeConverter": "4.0.1-*",
"System.Reflection.Extensions": "4.0.1-*",
"System.Text.Encoding.Extensions": "4.0.11-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -24,8 +26,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"imports": "portable-net451+win8"
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
]
}
}
}

View File

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using System.Threading.Tasks;

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using System.Threading.Tasks;

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using System.Threading.Tasks;

View File

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using System.Threading.Tasks;

View File

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using System.Threading.Tasks;

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -55,11 +57,14 @@
"System.Runtime": ""
}
},
"dotnet5.4": {
"imports": "portable-net451+win8",
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"System.Text.Encoding": "4.0.11-*"
}
}
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -17,8 +19,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"imports": "portable-net451+win8"
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
]
}
}
}

View File

@ -3,7 +3,7 @@
using System;
using System.ComponentModel.DataAnnotations;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -29,8 +31,11 @@
"System.ComponentModel.DataAnnotations": ""
}
},
"dotnet5.4": {
"imports": "portable-net451+win8",
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"System.ComponentModel.Annotations": "4.1.0-*"
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -21,8 +23,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"imports": "portable-net451+win8"
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
]
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -29,8 +31,11 @@
"System.Xml": ""
}
},
"dotnet5.4": {
"imports": "portable-net451+win8",
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"System.Runtime.Serialization.Xml": "4.1.0-*",
"System.Xml.XmlSerializer": "4.0.11-*"

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization
/// </summary>
public class LocalizedHtmlString : IHtmlContent
{
#if DOTNET5_5
#if NETSTANDARD1_4
private static readonly object[] EmptyArguments = Array.Empty<object>();
#else
private static readonly object[] EmptyArguments = new object[0];

View File

@ -4,7 +4,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -19,8 +21,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.6": {
"imports": "portable-net45+win8"
"netstandard1.5": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"exclude": [

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -26,14 +28,17 @@
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*"
}
},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
"System.Collections.Concurrent": "4.0.12-*",
"System.ComponentModel.TypeConverter": "4.0.1-*",
"System.Reflection.Extensions": "4.0.1-*",
"System.Text.Encoding.Extensions": "4.0.11-*"
}
},
"imports": [
"dotnet5.4"
]
}
},
"exclude": [

View File

@ -9,7 +9,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.PortableExecutable;
#if DOTNET5_6
#if NETSTANDARD1_5
using System.Runtime.Loader;
#endif
using System.Text;
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
private readonly ILogger _logger;
private readonly DependencyContext _dependencyContext;
#if DOTNET5_6
#if NETSTANDARD1_5
private readonly RazorLoadContext _razorLoadContext;
#endif
@ -74,7 +74,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
_compilationOptions = optionsAccessor.Value.CompilationOptions;
_logger = loggerFactory.CreateLogger<DefaultRoslynCompilationService>();
#if DOTNET5_6
#if NETSTANDARD1_5
_razorLoadContext = new RazorLoadContext();
#endif
@ -308,7 +308,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
mappedLineSpan.EndLinePosition.Character + 1);
}
#if DOTNET5_6
#if NETSTANDARD1_5
private class RazorLoadContext : AssemblyLoadContext
{
protected override Assembly Load(AssemblyName assemblyName)

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -39,8 +41,11 @@
"System.Threading.Tasks": ""
}
},
"dotnet5.6": {
"imports": "portable-net45+win8",
"netstandard1.5": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
],
"dependencies": {
"System.Text.Encoding": "4.0.11-*",
"System.Runtime.Loader": "4.0.0-*",

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -31,8 +33,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.6": {
"imports": "portable-net45+win8",
"netstandard1.5": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
],
"dependencies": {
"System.Security.Cryptography.Algorithms": "4.0.0-*"
}

View File

@ -5,7 +5,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Reflection;
#endif
using Microsoft.AspNetCore.Mvc.ModelBinding;

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -40,8 +42,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"imports": "portable-net451+win8",
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
]
}
}
}

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.ObjectModel;
using System.Diagnostics;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Net.Http.Headers;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Collections.ObjectModel;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using Microsoft.AspNetCore.WebUtilities;
using System.Collections;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Globalization;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Net.Http.Headers;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Net.Http.Headers;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Net.Http.Headers;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
namespace System.Net.Http.Formatting
{

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Diagnostics;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Diagnostics;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Diagnostics;
using System.Net.Http.Headers;

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if DOTNET5_4
#if NETSTANDARD1_3
using System.Collections.Generic;
using System.Diagnostics;

View File

@ -19,7 +19,7 @@ namespace System.Net.Http
/// </summary>
public static class HttpRequestMessageExtensions
{
#if !DOTNET5_4
#if !NETSTANDARD1_3
/// <summary>
/// Helper method for creating an <see cref="HttpResponseMessage"/> message with a "416 (Requested Range Not

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -29,8 +31,11 @@
"System.Xml": ""
}
},
"dotnet5.4": {
"imports": "portable-net451+win8",
"netstandard1.3": {
"imports": [
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"System.Net.Http": "4.0.1-*",
"System.Runtime.Serialization.Xml": "4.1.0-*",

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -28,8 +30,11 @@
},
"frameworks": {
"net451": {},
"dotnet5.6": {
"imports": "portable-net451+win8"
"netstandard1.5": {
"imports": [
"dotnet5.6",
"portable-net451+win8"
]
}
}
}

View File

@ -13,8 +13,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -18,8 +18,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using System.Text.Encodings.Web;
#if DNXCORE50
#if NETSTANDARDAPP1_5
using System.Reflection;
#endif
using System.Threading.Tasks;

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
#if DNXCORE50
#if NETSTANDARDAPP1_5
using System.Reflection;
#endif
using Microsoft.AspNetCore.Http;

View File

@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal
{
public class NonDisposableStreamTest
{
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
[Fact]
public void InnerStreamIsOpenOnClose()
{
@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal
nonDisposableStream.Dispose();
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
[Fact]
public void InnerStreamIsNotFlushedOnClose()
{

View File

@ -27,8 +27,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -20,8 +20,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -20,8 +20,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -219,14 +219,14 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
{ "This is a test 激光這兩個字是甚麼意思 string written using utf-8", "utf-8", true },
{ "This is a test 激光這兩個字是甚麼意思 string written using utf-16", "utf-16", true },
{ "This is a test 激光這兩個字是甚麼意思 string written using utf-32", "utf-32", false },
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// CoreCLR does not like shift_jis as an encoding.
{ "This is a test 激光這兩個字是甚麼意思 string written using shift_jis", "shift_jis", false },
#endif
{ "This is a test æøå string written using iso-8859-1", "iso-8859-1", false },
};
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// CoreCLR does not like iso-2022-kr as an encoding.
if (!TestPlatformHelper.IsMono)
{

View File

@ -20,8 +20,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -427,7 +427,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Xml
}
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// DataContractSerializer in CoreCLR does not throw if the declared type is different from the type being
// serialized.
[ConditionalFact]

View File

@ -19,8 +19,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -26,10 +26,10 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
var expected =
@"This method is running from NET451
This method is only defined in NET451";
#elif DNXCORE50
#elif NETSTANDARDAPP1_5
var expected =
@"This method is running from DNXCORE50
This method is only defined in DNXCORE50";
@"This method is running from NETSTANDARDAPP1_5
This method is only defined in NETSTANDARDAPP1_5";
#endif
// Act

View File

@ -5,7 +5,7 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
using Microsoft.AspNetCore.Testing.xunit;
#endif
using Xunit;
@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public HttpClient Client { get; }
#if DNXCORE50
#if NETSTANDARDAPP1_5
[Theory]
#else
[ConditionalTheory]

View File

@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public class MvcSampleFixture<TStartup> : MvcTestFixture<TStartup>
{
public MvcSampleFixture()
#if DNXCORE50
#if NETSTANDARDAPP1_5
:base("../../../../../../samples/")
#else
: base("../../../../samples/")

View File

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
private readonly TestServer _server;
public MvcTestFixture()
#if DNXCORE50
#if NETSTANDARDAPP1_5
: this(Path.Combine("..", "..", "..", "..", "..", "WebSites"))
#else
: this(Path.Combine("..", "..", "..", "WebSites"))

View File

@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
{
typeof(JsonMediaTypeFormatter).FullName,
typeof(XmlMediaTypeFormatter).FullName,
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
typeof(FormUrlEncodedMediaTypeFormatter).FullName,
#endif
};

View File

@ -57,13 +57,16 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"Microsoft.Dnx.Compilation.CSharp.Common": "1.0.0-*",
"Microsoft.Dnx.Compilation.CSharp.Abstractions": "1.0.0-*",
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"dnx451": {
"dependencies": {
@ -71,7 +74,7 @@
"xunit.runner.aspnet": "2.0.0-aspnet-*"
}
},
"net451": { }
"net451": {}
},
"exclude": [
"wwwroot",

View File

@ -19,8 +19,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -18,8 +18,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -25,8 +25,11 @@
"keyFile": "../../tools/Key.snk"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -33,8 +33,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"
@ -57,4 +60,4 @@
"node_modules",
"bower_components"
]
}
}

View File

@ -21,8 +21,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -15,8 +15,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -3,10 +3,13 @@
"shared": "**/*.cs",
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Runtime": "4.1.0-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}

View File

@ -3,10 +3,13 @@
"shared": "**/*.cs",
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Runtime": "4.1.0-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}

View File

@ -26,8 +26,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -149,7 +149,7 @@ namespace System.Net.Http.Formatting
{
get
{
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// Only mapping and accept makes sense with q != 1.0
MediaTypeFormatterMatch matchMapping10 = CreateMatch(1.0, MediaTypeFormatterMatchRanking.MatchOnRequestWithMediaTypeMapping);
MediaTypeFormatterMatch matchMapping05 = CreateMatch(0.5, MediaTypeFormatterMatchRanking.MatchOnRequestWithMediaTypeMapping);
@ -176,7 +176,7 @@ namespace System.Net.Http.Formatting
{ new List<MediaTypeFormatterMatch>() { matchType10, matchRequest10, matchAcceptAllRange10 }, matchAcceptAllRange10 },
{ new List<MediaTypeFormatterMatch>() { matchType10, matchRequest10, matchAcceptAllRange10, matchAcceptSubTypeRange10 }, matchAcceptSubTypeRange10 },
{ new List<MediaTypeFormatterMatch>() { matchType10, matchRequest10, matchAcceptAllRange10, matchAcceptSubTypeRange10, matchAccept10 }, matchAccept10 },
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
{ new List<MediaTypeFormatterMatch>() { matchType10, matchRequest10, matchAcceptAllRange10, matchAcceptSubTypeRange10, matchAccept10, matchMapping10 }, matchMapping10 },
#endif
{ new List<MediaTypeFormatterMatch>() { matchAccept05, matchAccept10 }, matchAccept10 },
@ -187,7 +187,7 @@ namespace System.Net.Http.Formatting
{ new List<MediaTypeFormatterMatch>() { matchAcceptAllRange05, matchAcceptAllRange10 }, matchAcceptAllRange10 },
{ new List<MediaTypeFormatterMatch>() { matchAcceptAllRange10, matchAcceptAllRange05 }, matchAcceptAllRange10 },
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
{ new List<MediaTypeFormatterMatch>() { matchMapping05, matchMapping10 }, matchMapping10 },
{ new List<MediaTypeFormatterMatch>() { matchMapping10, matchMapping05 }, matchMapping10 },
@ -251,7 +251,7 @@ namespace System.Net.Http.Formatting
Assert.Null(result);
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
[Fact]
public void Negotiate_MediaTypeMappingTakesPrecedenceOverAcceptHeader()
@ -359,7 +359,7 @@ namespace System.Net.Http.Formatting
Assert.IsType<JsonMediaTypeFormatter>(result.Formatter);
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
[Fact]
public void Negotiate_RespectsFormatterOrdering_ForXhrRequestThatDoesNotSpecifyAcceptHeaders()
@ -458,7 +458,7 @@ namespace System.Net.Http.Formatting
}
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
[Fact]
public void MatchMediaTypeMapping_ReturnsMatch()
@ -810,7 +810,7 @@ namespace System.Net.Http.Formatting
}
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
private class MyMediaTypeMapping : MediaTypeMapping
{

View File

@ -282,7 +282,7 @@ namespace System.Net.Http
Assert.Equal("bin/baz", response.Content.Headers.ContentType.MediaType);
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// API doesn't exist in CoreCLR.
[Fact]
public void CreateErrorResponseRangeNotSatisfiable_SetsCorrectStatusCodeAndContentRangeHeader()

View File

@ -34,7 +34,7 @@ namespace System.Net.Http.Formatting.Mocks
return base.SelectResponseCharacterEncoding(request, formatter);
}
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
public new MediaTypeFormatterMatch MatchMediaTypeMapping(HttpRequestMessage request, MediaTypeFormatter formatter)
{

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
using System.Net.Http.Headers;

View File

@ -16,8 +16,11 @@
"test": "xunit.runner.aspnet"
},
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8",
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": {
"moq.netcore": "4.4.0-beta8",
"dotnet-test-xunit": "1.0.0-dev-*"

View File

@ -16,8 +16,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -15,8 +15,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -17,8 +17,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
},
"exclude": [

View File

@ -5,8 +5,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -16,8 +16,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -17,8 +17,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -16,8 +16,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -17,8 +17,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -17,8 +17,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -16,8 +16,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -15,8 +15,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -8,9 +8,12 @@
"Microsoft.NETCore.Platforms": "1.0.1-*"
},
"frameworks": {
"net451": { },
"dnxcore50": {
"imports": "portable-net451+win8"
"net451": {},
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}
}

View File

@ -16,8 +16,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -9,8 +9,8 @@ namespace RazorWebSite
{
#if NET451 || DNX451
return "This method is running from NET451";
#elif DNXCORE50
return "This method is running from DNXCORE50";
#elif NETSTANDARDAPP1_5
return "This method is running from NETSTANDARDAPP1_5";
#endif
}
@ -21,10 +21,10 @@ namespace RazorWebSite
}
#endif
#if DNXCORE50_CUSTOM_DEFINE
public string ExecuteDnxCore50Operation()
#if NETSTANDARDAPP1_5_CUSTOM_DEFINE
public string ExecuteNetStandardApp1_5Operation()
{
return "This method is only defined in DNXCORE50";
return "This method is only defined in NETSTANDARDAPP1_5";
}
#endif
}

View File

@ -4,8 +4,8 @@
#if NET451_CUSTOM_DEFINE
MyHelper.ExecuteNet451Operation();
#endif
#if DNXCORE50_CUSTOM_DEFINE
MyHelper.ExecuteDnxCore50Operation();
#if NETSTANDARDAPP1_5_CUSTOM_DEFINE
MyHelper.ExecuteNetStandardApp1_5Operation();
#endif
}
@value

View File

@ -23,13 +23,16 @@
]
}
},
"dnxcore50": {
"netstandardapp1.5": {
"compilationOptions": {
"define": [
"DNXCORE50_CUSTOM_DEFINE"
"NETSTANDARDAPP1_5_CUSTOM_DEFINE"
]
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -15,8 +15,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -13,8 +13,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

View File

@ -18,8 +18,11 @@
},
"frameworks": {
"net451": {},
"dnxcore50": {
"imports": "portable-net451+win8"
"netstandardapp1.5": {
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}

Some files were not shown because too many files have changed in this diff Show More