diff --git a/src/Configuration/Config.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj b/src/Configuration/Config.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj index 4eb19f329375..82784d0eed89 100644 --- a/src/Configuration/Config.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj +++ b/src/Configuration/Config.KeyPerFile/src/Microsoft.Extensions.Configuration.KeyPerFile.csproj @@ -4,6 +4,7 @@ Configuration provider that uses files in a directory for Microsoft.Extensions.Configuration. netstandard2.0 false + true diff --git a/src/Configuration/Directory.Build.props b/src/Configuration/Directory.Build.props index 2082380096b1..fe35a9faec6a 100644 --- a/src/Configuration/Directory.Build.props +++ b/src/Configuration/Directory.Build.props @@ -2,7 +2,7 @@ - true + true configuration diff --git a/src/FileProviders/Directory.Build.props b/src/FileProviders/Directory.Build.props index bf4410dcb77e..709c47ddbd7a 100644 --- a/src/FileProviders/Directory.Build.props +++ b/src/FileProviders/Directory.Build.props @@ -2,7 +2,7 @@ - true + true files;filesystem diff --git a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj index e8dd5d85dd08..90cb2e4cc336 100644 --- a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj +++ b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj @@ -5,8 +5,13 @@ File provider for files in embedded resources for Microsoft.Extensions.FileProviders. netstandard2.0 $(MSBuildProjectName).nuspec + true + + + + @@ -18,7 +23,6 @@ - id=$(PackageId); @@ -40,10 +44,9 @@ OutputDocumentation=@(DocumentationProjectOutputGroupOutput); - TaskAssemblyNetStandard=..\..\Manifest.MSBuildTask\src\bin\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.dll; - TaskSymbolNetStandard=..\..\Manifest.MSBuildTask\src\bin\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.pdb; + TaskAssemblyNetStandard=$(ArtifactsDir)bin\$(AssemblyName).Manifest.Task\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.dll; + TaskSymbolNetStandard=$(ArtifactsDir)bin\$(AssemblyName).Manifest.Task\$(Configuration)\netstandard2.0\$(AssemblyName).Manifest.Task.pdb; - diff --git a/src/FileProviders/Embedded/src/Properties/AssemblyInfo.cs b/src/FileProviders/Embedded/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 610a7fa706f1..000000000000 --- a/src/FileProviders/Embedded/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,4 +0,0 @@ - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.Extensions.FileProviders.Embedded.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Test.csproj b/src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Tests.csproj similarity index 100% rename from src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Test.csproj rename to src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Tests.csproj diff --git a/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj b/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj index b95d66f7b38a..69298be027b7 100644 --- a/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj +++ b/src/HealthChecks/Abstractions/src/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.csproj @@ -11,6 +11,7 @@ Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck $(NoWarn);CS1591 true diagnostics;healthchecks + true diff --git a/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj b/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj index d0b1c97ef05a..b49f194d0c0a 100644 --- a/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj +++ b/src/HealthChecks/HealthChecks/src/Microsoft.Extensions.Diagnostics.HealthChecks.csproj @@ -10,8 +10,13 @@ Microsoft.Extensions.Diagnostics.HealthChecks.IHealthChecksBuilder $(NoWarn);CS1591 true diagnostics;healthchecks + true + + + + diff --git a/src/HealthChecks/HealthChecks/src/Properties/AssemblyInfo.cs b/src/HealthChecks/HealthChecks/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 13e969bfad29..000000000000 --- a/src/HealthChecks/HealthChecks/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.Extensions.Diagnostics.HealthChecks.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj index bdfea26ad505..d91e8c2524e7 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj +++ b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj @@ -7,4 +7,8 @@ true + + + + diff --git a/src/JSInterop/Microsoft.JSInterop/src/Properties/AssemblyInfo.cs b/src/JSInterop/Microsoft.JSInterop/src/Properties/AssemblyInfo.cs deleted file mode 100644 index d65c89dc7f12..000000000000 --- a/src/JSInterop/Microsoft.JSInterop/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.JSInterop.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/JSInterop/Microsoft.JSInterop/test/DotNetDispatcherTest.cs b/src/JSInterop/Microsoft.JSInterop/test/DotNetDispatcherTest.cs index eec537f987d2..93ef9a249850 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/DotNetDispatcherTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/DotNetDispatcherTest.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Xunit; -namespace Microsoft.JSInterop.Test +namespace Microsoft.JSInterop.Tests { public class DotNetDispatcherTest { @@ -73,7 +73,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier) Assert.Equal($"The assembly '{thisAssemblyName}' does not contain a public method with [JSInvokableAttribute(\"{methodIdentifier}\")].", ex.Message); } - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")] public Task CanInvokeStaticVoidMethod() => WithJSRuntime(jsRuntime => { // Arrange/Act @@ -109,7 +109,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier) Assert.Equal(456, result.IntVal); }); - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")] public Task CanInvokeStaticWithParams() => WithJSRuntime(jsRuntime => { // Arrange: Track a .NET object to use as an arg @@ -140,7 +140,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier) Assert.Equal(1299, resultDto2.IntVal); }); - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")] public Task CanInvokeInstanceVoidMethod() => WithJSRuntime(jsRuntime => { // Arrange: Track some instance @@ -155,7 +155,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier) Assert.True(targetInstance.DidInvokeMyInvocableInstanceVoid); }); - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")] public Task CanInvokeBaseInstanceVoidMethod() => WithJSRuntime(jsRuntime => { // Arrange: Track some instance @@ -206,7 +206,7 @@ public void CannotInvokeUnsuitableMethods(string methodIdentifier) Assert.StartsWith("There is no tracked object with id '1'.", ex.Message); }); - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")] public Task CanInvokeInstanceMethodWithParams() => WithJSRuntime(jsRuntime => { // Arrange: Track some instance plus another object we'll pass as a param @@ -242,7 +242,7 @@ public void CannotInvokeWithIncorrectNumberOfParams() Assert.Equal("In call to 'InvocableStaticWithParams', expected 3 parameters but received 4.", ex.Message); } - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore-Internal/issues/1733")] public Task CanInvokeAsyncMethod() => WithJSRuntime(async jsRuntime => { // Arrange: Track some instance plus another object we'll pass as a param @@ -320,7 +320,8 @@ public class SomePublicType protected static void StaticMethodWithoutAttribute() { } protected static void InstanceMethodWithoutAttribute() { } - [JSInvokable("InvocableStaticVoid")] public static void MyInvocableVoid() + [JSInvokable("InvocableStaticVoid")] + public static void MyInvocableVoid() { DidInvokeMyInvocableStaticVoid = true; } diff --git a/src/JSInterop/Microsoft.JSInterop/test/DotNetObjectRefTest.cs b/src/JSInterop/Microsoft.JSInterop/test/DotNetObjectRefTest.cs index 969dcae79d91..1bdec6d46521 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/DotNetObjectRefTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/DotNetObjectRefTest.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Xunit; -namespace Microsoft.JSInterop.Test +namespace Microsoft.JSInterop.Tests { public class DotNetObjectRefTest { diff --git a/src/JSInterop/Microsoft.JSInterop/test/JSInProcessRuntimeBaseTest.cs b/src/JSInterop/Microsoft.JSInterop/test/JSInProcessRuntimeBaseTest.cs index d2e71f6eb217..36474fe40717 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/JSInProcessRuntimeBaseTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/JSInProcessRuntimeBaseTest.cs @@ -6,7 +6,7 @@ using System.Linq; using Xunit; -namespace Microsoft.JSInterop.Test +namespace Microsoft.JSInterop.Tests { public class JSInProcessRuntimeBaseTest { @@ -21,7 +21,7 @@ public void DispatchesSyncCallsAndDeserializesResults() }; // Act - var syncResult = runtime.Invoke("test identifier 1", "arg1", 123, true ); + var syncResult = runtime.Invoke("test identifier 1", "arg1", 123, true); var call = runtime.InvokeCalls.Single(); // Assert diff --git a/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeBaseTest.cs b/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeBaseTest.cs index 9193d6deb8d1..ab048e812fe7 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeBaseTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeBaseTest.cs @@ -7,7 +7,7 @@ using System.Linq; using Xunit; -namespace Microsoft.JSInterop.Test +namespace Microsoft.JSInterop.Tests { public class JSRuntimeBaseTest { @@ -18,7 +18,7 @@ public void DispatchesAsyncCallsWithDistinctAsyncHandles() var runtime = new TestJSRuntime(); // Act - runtime.InvokeAsync("test identifier 1", "arg1", 123, true ); + runtime.InvokeAsync("test identifier 1", "arg1", 123, true); runtime.InvokeAsync("test identifier 2", "some other arg"); // Assert diff --git a/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeTest.cs b/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeTest.cs index d5fed45ea4ff..b8a1c363dc99 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/JSRuntimeTest.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Xunit; -namespace Microsoft.JSInterop.Test +namespace Microsoft.JSInterop.Tests { public class JSRuntimeTest { diff --git a/src/JSInterop/Microsoft.JSInterop/test/JsonUtilTest.cs b/src/JSInterop/Microsoft.JSInterop/test/JsonUtilTest.cs index 1be98b681e19..2b239faab9c2 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/JsonUtilTest.cs +++ b/src/JSInterop/Microsoft.JSInterop/test/JsonUtilTest.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Xunit; -namespace Microsoft.JSInterop.Test +namespace Microsoft.JSInterop.Tests { public class JsonUtilTest { @@ -124,10 +124,10 @@ public void CanSerializeStructToJson() BoolProperty = true, NullableIntProperty = 1 }; - + // Act var result = Json.Serialize(commandResult); - + // Assert Assert.Equal("{\"stringProperty\":\"Test\",\"boolProperty\":true,\"nullableIntProperty\":1}", result); } @@ -222,12 +222,12 @@ public void NonEmptyConstructorThrowsUsefulException() // Act var exception = Assert.Throws(() => { - Json.Deserialize(json); + Json.Deserialize(json); }); // Assert Assert.Equal( - $"Cannot deserialize JSON into type '{type.FullName}' because it does not have a public parameterless constructor.", + $"Cannot deserialize JSON into type '{type.FullName}' because it does not have a public parameterless constructor.", exception.Message); } @@ -277,7 +277,7 @@ public void MemberNameToCamelCase_Invalid(string input) class NonEmptyConstructorPoco { - public NonEmptyConstructorPoco(int parameter) {} + public NonEmptyConstructorPoco(int parameter) { } public int Property { get; set; } } diff --git a/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Test.csproj b/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Test.csproj deleted file mode 100644 index 5e88f44a3a4d..000000000000 --- a/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Test.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - diff --git a/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj b/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj new file mode 100644 index 000000000000..a39b08218068 --- /dev/null +++ b/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp3.0 + + + + + + + + + + + diff --git a/src/JSInterop/Microsoft.JSInterop/test/xunit.runner.json b/src/JSInterop/Microsoft.JSInterop/test/xunit.runner.json new file mode 100644 index 000000000000..0f2ad9f7698f --- /dev/null +++ b/src/JSInterop/Microsoft.JSInterop/test/xunit.runner.json @@ -0,0 +1,3 @@ +{ + "shadowCopy": true +} diff --git a/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj b/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj index 8508eb071aad..636072724fce 100644 --- a/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj +++ b/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj @@ -10,6 +10,7 @@ Microsoft.Extensions.Localization.IStringLocalizer<T> $(NoWarn);CS1591 true localization + true diff --git a/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj b/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj index 73365a15eb47..8a820ac7b933 100644 --- a/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj +++ b/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj @@ -7,6 +7,7 @@ $(NoWarn);CS1591 true localization + true @@ -16,4 +17,8 @@ + + + + diff --git a/src/Localization/Localization/src/Properties/AssemblyInfo.cs b/src/Localization/Localization/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 3e297b801e9b..000000000000 --- a/src/Localization/Localization/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// 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. - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.Extensions.Localization.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/ObjectPool/perf/Properties/AssemblyInfo.cs b/src/ObjectPool/perf/Properties/AssemblyInfo.cs index 409fcf814af9..facbd7e3925f 100644 --- a/src/ObjectPool/perf/Properties/AssemblyInfo.cs +++ b/src/ObjectPool/perf/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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. [assembly: BenchmarkDotNet.Attributes.AspNetCoreBenchmark] diff --git a/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj b/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj index cb42c5615a51..646d18a8b7f5 100644 --- a/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj +++ b/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj @@ -6,6 +6,7 @@ $(NoWarn);CS1591 true pooling + true diff --git a/src/Shared/src/ActivatorUtilities/Microsoft.Extensions.ActivatorUtilities.Sources.csproj b/src/Shared/src/ActivatorUtilities/Microsoft.Extensions.ActivatorUtilities.Sources.csproj new file mode 100644 index 000000000000..85545d30c810 --- /dev/null +++ b/src/Shared/src/ActivatorUtilities/Microsoft.Extensions.ActivatorUtilities.Sources.csproj @@ -0,0 +1,14 @@ + + + + + + + true + $(ContentTargetFolders)\cs\netstandard1.0\ + + + + + + diff --git a/src/Shared/src/ActivatorUtilities/sharedsources.props b/src/Shared/src/ActivatorUtilities/sharedsources.props index b35fe34b10f6..f75467753195 100644 --- a/src/Shared/src/ActivatorUtilities/sharedsources.props +++ b/src/Shared/src/ActivatorUtilities/sharedsources.props @@ -1,4 +1,8 @@ + + false + + true diff --git a/src/Shared/src/BenchmarkRunner/Directory.Build.props b/src/Shared/src/BenchmarkRunner/Directory.Build.props deleted file mode 100644 index d2f65e8d3dc4..000000000000 --- a/src/Shared/src/BenchmarkRunner/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - Microsoft.AspNetCore.BenchmarkRunner.Sources - - diff --git a/src/Shared/src/BenchmarkRunner/Microsoft.AspNetCore.BenchmarkRunner.Sources.csproj b/src/Shared/src/BenchmarkRunner/Microsoft.AspNetCore.BenchmarkRunner.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/BenchmarkRunner/Microsoft.AspNetCore.BenchmarkRunner.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.csproj b/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.projitems b/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.projitems index 5da4522c6afb..72e5498e44b9 100644 --- a/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.projitems +++ b/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.projitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) diff --git a/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.shproj b/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.shproj deleted file mode 100644 index c728fe1012ce..000000000000 --- a/src/Shared/src/CommandLineUtils/Microsoft.Extensions.CommandLineUtils.Sources.shproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - 00947d4a-c20e-46e3-90c3-6cd6bc87ee72 - 14.0 - - - - - - - - diff --git a/src/Shared/src/Directory.Build.props b/src/Shared/src/Directory.Build.props index b98d9229f1b1..264f2f4cfac7 100644 --- a/src/Shared/src/Directory.Build.props +++ b/src/Shared/src/Directory.Build.props @@ -1,9 +1,31 @@ - + + netstandard1.0 + true + false + true + false + false + false false - Microsoft.Extensions.$(ProjectDirName).Sources + contentFiles + true + $(DefaultExcludeItems);$(BaseOutputPath);$(BaseIntermediateOutputPath); + $(NoWarn);NU5105;CS8021 + + + + true + $(ContentTargetFolders)\cs\netstandard1.0\shared\ + + + true + $(ContentTargetFolders)\any\any\shared\ + + + diff --git a/src/Shared/src/HashCodeCombiner/Microsoft.Extensions.HashCodeCombiner.Sources.csproj b/src/Shared/src/HashCodeCombiner/Microsoft.Extensions.HashCodeCombiner.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/HashCodeCombiner/Microsoft.Extensions.HashCodeCombiner.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Shared/src/NonCapturingTimer/Microsoft.Extensions.NonCapturingTimer.Sources.csproj b/src/Shared/src/NonCapturingTimer/Microsoft.Extensions.NonCapturingTimer.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/NonCapturingTimer/Microsoft.Extensions.NonCapturingTimer.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Shared/src/ParameterDefaultValue/Microsoft.Extensions.ParameterDefaultValue.Sources.csproj b/src/Shared/src/ParameterDefaultValue/Microsoft.Extensions.ParameterDefaultValue.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/ParameterDefaultValue/Microsoft.Extensions.ParameterDefaultValue.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Shared/src/TypeNameHelper/Microsoft.Extensions.TypeNameHelper.Sources.csproj b/src/Shared/src/TypeNameHelper/Microsoft.Extensions.TypeNameHelper.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/TypeNameHelper/Microsoft.Extensions.TypeNameHelper.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Shared/src/ValueStopwatch/Microsoft.Extensions.ValueStopWatch.Sources.csproj b/src/Shared/src/ValueStopwatch/Microsoft.Extensions.ValueStopWatch.Sources.csproj new file mode 100644 index 000000000000..dec7fff6e5fd --- /dev/null +++ b/src/Shared/src/ValueStopwatch/Microsoft.Extensions.ValueStopWatch.Sources.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Microsoft.AspNetCore.Testing.csproj b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Microsoft.AspNetCore.Testing.csproj index 64e0b3c4e1d6..0e33852b62d7 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Microsoft.AspNetCore.Testing.csproj +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Microsoft.AspNetCore.Testing.csproj @@ -8,10 +8,15 @@ aspnetcore false true + false true + + + + diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Properties/AssemblyInfo.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 0212e111ee08..000000000000 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// 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. - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Testing.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs index ebd10897c382..f982471f39b2 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/TestPathUtilities.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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. using System; @@ -8,6 +8,11 @@ namespace Microsoft.AspNetCore.Testing { public class TestPathUtilities { + public static string GetRepoRootDirectory() + { + return GetSolutionRootDirectory("Extensions"); + } + public static string GetSolutionRootDirectory(string solution) { var applicationBasePath = AppContext.BaseDirectory; diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs index 819373fa3136..cf49b29e5a7f 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs @@ -20,8 +20,8 @@ protected override IXunitTestCase CreateTestCase(ITestFrameworkDiscoveryOptions { var skipReason = testMethod.EvaluateSkipConditions(); return skipReason != null - ? new SkippedTestCase(skipReason, _diagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod) + ? new SkippedTestCase(skipReason, _diagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod) : base.CreateTestCase(discoveryOptions, testMethod, factAttribute); } } -} \ No newline at end of file +} diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs index 9249078cc5c3..fe45f2ffc666 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryAttribute.cs @@ -12,4 +12,4 @@ namespace Microsoft.AspNetCore.Testing.xunit public class ConditionalTheoryAttribute : TheoryAttribute { } -} \ No newline at end of file +} diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs index d24421f5cd32..9e413cd5801a 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs @@ -14,11 +14,30 @@ public ConditionalTheoryDiscoverer(IMessageSink diagnosticMessageSink) { } + private sealed class OptionsWithPreEnumerationEnabled : ITestFrameworkDiscoveryOptions + { + private const string PreEnumerateTheories = "xunit.discovery.PreEnumerateTheories"; + + private readonly ITestFrameworkDiscoveryOptions _original; + + public OptionsWithPreEnumerationEnabled(ITestFrameworkDiscoveryOptions original) + => _original = original; + + public TValue GetValue(string name) + => (name == PreEnumerateTheories) ? (TValue)(object)true : _original.GetValue(name); + + public void SetValue(string name, TValue value) + => _original.SetValue(name, value); + } + + public override IEnumerable Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo theoryAttribute) + => base.Discover(new OptionsWithPreEnumerationEnabled(discoveryOptions), testMethod, theoryAttribute); + protected override IEnumerable CreateTestCasesForTheory(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo theoryAttribute) { var skipReason = testMethod.EvaluateSkipConditions(); return skipReason != null - ? new[] { new SkippedTestCase(skipReason, DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod) } + ? new[] { new SkippedTestCase(skipReason, DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod) } : base.CreateTestCasesForTheory(discoveryOptions, testMethod, theoryAttribute); } @@ -44,4 +63,4 @@ protected override IEnumerable CreateTestCasesForDataRow(ITestFr : base.CreateTestCasesForDataRow(discoveryOptions, testMethod, theoryAttribute, dataRow); } } -} \ No newline at end of file +} diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs index c2e15fa640c4..1c25c507b972 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/SkippedTestCase.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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. using System; @@ -16,8 +16,14 @@ public SkippedTestCase() : base() { } - public SkippedTestCase(string skipReason, IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, ITestMethod testMethod, object[] testMethodArguments = null) - : base(diagnosticMessageSink, defaultMethodDisplay, testMethod, testMethodArguments) + public SkippedTestCase( + string skipReason, + IMessageSink diagnosticMessageSink, + TestMethodDisplay defaultMethodDisplay, + TestMethodDisplayOptions defaultMethodDisplayOptions, + ITestMethod testMethod, + object[] testMethodArguments = null) + : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod, testMethodArguments) { _skipReason = skipReason; } @@ -37,4 +43,4 @@ public override void Serialize(IXunitSerializationInfo data) data.AddValue(nameof(_skipReason), _skipReason); } } -} \ No newline at end of file +} diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/Microsoft.AspNetCore.Testing.Tests.csproj b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/Microsoft.AspNetCore.Testing.Tests.csproj index 691c9ccd769d..acfb34b32028 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/Microsoft.AspNetCore.Testing.Tests.csproj +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/Microsoft.AspNetCore.Testing.Tests.csproj @@ -24,5 +24,4 @@ - diff --git a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs index 0c9a7c5ee4a8..c77194a548ce 100644 --- a/src/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs +++ b/src/TestingUtils/Microsoft.AspNetCore.Testing/test/TestPathUtilitiesTest.cs @@ -16,7 +16,7 @@ public void GetSolutionRootDirectory_ResolvesSolutionRoot() // Testing\test\Microsoft.AspNetCore.Testing.Tests\bin\Debug\netcoreapp2.0 // Testing\test\Microsoft.AspNetCore.Testing.Tests\bin\Debug\net461 // Testing\test\Microsoft.AspNetCore.Testing.Tests\bin\Debug\net46 - var expectedPath = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "..", "..", "..")); + var expectedPath = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "..")); Assert.Equal(expectedPath, TestPathUtilities.GetSolutionRootDirectory("Extensions")); } diff --git a/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj b/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj index 18f96d9412b0..bc73592b3f5b 100644 --- a/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj +++ b/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj @@ -7,6 +7,7 @@ true true aspnetcore + true