From 78575e672ce1239337a748a2f4def3b1a7396ea1 Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Tue, 20 Sep 2016 15:21:13 -0700 Subject: [PATCH] Add ExcludeFromCodeCoverageAttribute --- .../packageIndex.json | 2 +- src/System.Diagnostics.Tools/dir.props | 2 +- .../pkg/System.Diagnostics.Tools.pkgproj | 5 ++++- .../pkg/aot/System.Diagnostics.Tools.pkgproj | 6 ------ .../ref/System.Diagnostics.Tools.cs | 4 ++++ .../ref/System.Diagnostics.Tools.csproj | 3 +-- src/System.Diagnostics.Tools/ref/project.json | 8 ++------ .../src/System.Diagnostics.Tools.builds | 6 +----- .../src/System.Diagnostics.Tools.csproj | 20 +++++++++---------- .../ExcludeFromCodeCoverageAttribute.cs | 13 ++++++++++++ src/System.Diagnostics.Tools/src/project.json | 14 +++---------- .../System.Diagnostics.Tools.Tests.builds | 6 +++++- .../System.Diagnostics.Tools.Tests.csproj | 11 +++++----- .../ExcludeFromCodeCoverageAttributeTests.cs | 18 +++++++++++++++++ .../tests/project.json | 3 ++- 15 files changed, 69 insertions(+), 52 deletions(-) create mode 100644 src/System.Diagnostics.Tools/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs create mode 100644 src/System.Diagnostics.Tools/tests/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttributeTests.cs diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index 8dc86f8bc8b6..51c6beca4f0f 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -1031,7 +1031,7 @@ "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", "4.0.1.0": "4.0.1", - "4.0.2.0": "4.3.0" + "4.1.0.0": "4.3.0" } }, "System.Diagnostics.TraceSource": { diff --git a/src/System.Diagnostics.Tools/dir.props b/src/System.Diagnostics.Tools/dir.props index 3a45f88c159a..0769c12aaa28 100644 --- a/src/System.Diagnostics.Tools/dir.props +++ b/src/System.Diagnostics.Tools/dir.props @@ -1,7 +1,7 @@ - 4.0.2.0 + 4.1.0.0 diff --git a/src/System.Diagnostics.Tools/pkg/System.Diagnostics.Tools.pkgproj b/src/System.Diagnostics.Tools/pkg/System.Diagnostics.Tools.pkgproj index afeb38aca7f2..6a501adb366a 100644 --- a/src/System.Diagnostics.Tools/pkg/System.Diagnostics.Tools.pkgproj +++ b/src/System.Diagnostics.Tools/pkg/System.Diagnostics.Tools.pkgproj @@ -3,10 +3,13 @@ - net45;netcore45;netcoreapp1.0;wp8;wpa81;$(AllXamarinFrameworks) + net463;netcoreapp1.1;$(AllXamarinFrameworks) + + net463 + diff --git a/src/System.Diagnostics.Tools/pkg/aot/System.Diagnostics.Tools.pkgproj b/src/System.Diagnostics.Tools/pkg/aot/System.Diagnostics.Tools.pkgproj index 0b8c70b588cd..d9827ceb9202 100644 --- a/src/System.Diagnostics.Tools/pkg/aot/System.Diagnostics.Tools.pkgproj +++ b/src/System.Diagnostics.Tools/pkg/aot/System.Diagnostics.Tools.pkgproj @@ -7,11 +7,5 @@ true - - - netcore50aot - - - \ No newline at end of file diff --git a/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.cs b/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.cs index 64afbaf64b16..c0c9376d4254 100644 --- a/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.cs +++ b/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.cs @@ -18,6 +18,10 @@ public GeneratedCodeAttribute(string tool, string version) { } } namespace System.Diagnostics.CodeAnalysis { + [System.AttributeUsageAttribute((System.AttributeTargets)748, Inherited=false, AllowMultiple=false)] + public sealed partial class ExcludeFromCodeCoverageAttribute : System.Attribute { + public ExcludeFromCodeCoverageAttribute() { } + } [System.AttributeUsageAttribute((System.AttributeTargets)(32767), Inherited = false, AllowMultiple = true)] [System.Diagnostics.ConditionalAttribute("CODE_ANALYSIS")] public sealed partial class SuppressMessageAttribute : System.Attribute diff --git a/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj b/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj index d2156f5f9525..4739c92930b1 100644 --- a/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj +++ b/src/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj @@ -2,9 +2,8 @@ - 4.0.0.0 Library - .NETStandard,Version=v1.0 + .NETStandard,Version=v1.7 diff --git a/src/System.Diagnostics.Tools/ref/project.json b/src/System.Diagnostics.Tools/ref/project.json index cd1d800ec722..f4f769032164 100644 --- a/src/System.Diagnostics.Tools/ref/project.json +++ b/src/System.Diagnostics.Tools/ref/project.json @@ -1,12 +1,8 @@ { "dependencies": { - "System.Runtime": "4.0.0" + "System.Runtime": "4.1.0" }, "frameworks": { - "netstandard1.0": { - "imports": [ - "dotnet5.1" - ] - } + "netstandard1.7": {} } } diff --git a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.builds b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.builds index beb14b718573..5bb1c0d7e3b9 100644 --- a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.builds +++ b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.builds @@ -3,12 +3,8 @@ - - - netcore50aot + net463 diff --git a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj index 64af9f6ea358..e893b6ae375a 100644 --- a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj +++ b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj @@ -5,27 +5,25 @@ {0B68298B-4672-4CA0-AD25-2F9ABEA1FF95} System.Diagnostics.Tools true - .NETStandard,Version=v1.3 + .NETStandard,Version=v1.7 - - - - - + + + - + - - - - + + + + diff --git a/src/System.Diagnostics.Tools/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs b/src/System.Diagnostics.Tools/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs new file mode 100644 index 000000000000..ebbda66b0cbf --- /dev/null +++ b/src/System.Diagnostics.Tools/src/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Diagnostics.CodeAnalysis +{ + [AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event, Inherited = false, AllowMultiple = false)] + public sealed class ExcludeFromCodeCoverageAttribute: Attribute + { + public ExcludeFromCodeCoverageAttribute() + { } + } +} diff --git a/src/System.Diagnostics.Tools/src/project.json b/src/System.Diagnostics.Tools/src/project.json index 451853d445b5..a065b8ab082f 100644 --- a/src/System.Diagnostics.Tools/src/project.json +++ b/src/System.Diagnostics.Tools/src/project.json @@ -1,21 +1,13 @@ { "frameworks": { - "netstandard1.3": { + "netstandard1.7": { "dependencies": { "Microsoft.TargetingPack.Private.CoreCLR": "1.2.0-beta-24530-04" - }, - "imports": [ - "dotnet5.4" - ] - }, - "net46": { - "dependencies": { - "Microsoft.TargetingPack.NETFramework.v4.6": "1.0.1" } }, - "netcore50": { + "net463": { "dependencies": { - "Microsoft.TargetingPack.Private.NETNative": "1.1.0-beta-24530-00" + "Microsoft.TargetingPack.NETFramework.v4.6": "1.0.1" } } } diff --git a/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.builds b/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.builds index cea15a4a0bf6..3d50833f9178 100644 --- a/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.builds +++ b/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.builds @@ -2,11 +2,15 @@ - + netcore50;net46 Windows_NT + + netstandard1.7 + netcoreapp1.1 + diff --git a/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj b/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj index 7ca4c24c329c..a63b16af9654 100644 --- a/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj +++ b/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj @@ -8,7 +8,7 @@ Library System System.Diagnostics.Tools.Tests - .NETStandard,Version=v1.3 + .NETStandard,Version=v1.3 @@ -17,13 +17,12 @@ + + + - - false - Content - PreserveNewest - Build;DebugSymbolsProjectOutputGroup + diff --git a/src/System.Diagnostics.Tools/tests/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttributeTests.cs b/src/System.Diagnostics.Tools/tests/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttributeTests.cs new file mode 100644 index 000000000000..efe08ce6f45f --- /dev/null +++ b/src/System.Diagnostics.Tools/tests/System/Diagnostics/CodeAnalysis/ExcludeFromCodeCoverageAttributeTests.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics.CodeAnalysis; +using Xunit; + +namespace System.Diagnostics.CodeAnalysis.Tests +{ + public class ExcludeFromCodeCoverageAttributeTests + { + [Fact] + public void ExcludeFromCodeCoverageAttribute_Instantiate() + { + new ExcludeFromCodeCoverageAttribute(); + } + } +} diff --git a/src/System.Diagnostics.Tools/tests/project.json b/src/System.Diagnostics.Tools/tests/project.json index 3f362bab302a..56bd48f8e5d7 100644 --- a/src/System.Diagnostics.Tools/tests/project.json +++ b/src/System.Diagnostics.Tools/tests/project.json @@ -13,7 +13,8 @@ "Microsoft.DotNet.BuildTools.TestSuite": "1.0.0-prerelease-00807-03" }, "frameworks": { - "netstandard1.3": {} + "netstandard1.3": {}, + "netstandard1.7": {} }, "supports": { "coreFx.Test.netcore50": {},