From 892d86e16b15522e10666bbb3aafb1284dfcc5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller?= Date: Fri, 8 Mar 2024 02:16:53 +0100 Subject: [PATCH] Fix TypeInitializer issue (#1636) * core back to standard, change of condition to msbuild props * update change log * only netstandard * nit * nit --------- Co-authored-by: David Mueller x --- Documentation/Changelog.md | 1 + src/coverlet.collector/coverlet.collector.csproj | 2 +- src/coverlet.core/coverlet.core.csproj | 2 +- .../buildMultiTargeting/coverlet.msbuild.props | 4 ---- src/coverlet.msbuild.tasks/coverlet.msbuild.props | 3 +-- src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj | 5 +---- test/Directory.Build.targets | 3 +-- .../coverlet.integration.determisticbuild.csproj | 1 - 8 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 src/coverlet.msbuild.tasks/buildMultiTargeting/coverlet.msbuild.props diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index 68fa8076a..9cd1203ba 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Threshold-stat triggers error [#1634](https://github.com/coverlet-coverage/coverlet/issues/1634) - Fixed coverlet collector 6.0.1 requires dotnet sdk 8 [#1625](https://github.com/coverlet-coverage/coverlet/issues/1625) +- Type initializer errors after updating from 6.0.0 to 6.0.1 [#1629](https://github.com/coverlet-coverage/coverlet/issues/1629) - Exception when multiple exclude-by-attribute filters specified [#1624](https://github.com/coverlet-coverage/coverlet/issues/1624) ### Improvements diff --git a/src/coverlet.collector/coverlet.collector.csproj b/src/coverlet.collector/coverlet.collector.csproj index fc6145d80..ddb8522ba 100644 --- a/src/coverlet.collector/coverlet.collector.csproj +++ b/src/coverlet.collector/coverlet.collector.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net6.0 + netstandard2.0 coverlet.collector true true diff --git a/src/coverlet.core/coverlet.core.csproj b/src/coverlet.core/coverlet.core.csproj index fd4fe2c2b..5e78d106a 100644 --- a/src/coverlet.core/coverlet.core.csproj +++ b/src/coverlet.core/coverlet.core.csproj @@ -2,7 +2,7 @@ Library - netstandard2.0;net6.0 + netstandard2.0 false diff --git a/src/coverlet.msbuild.tasks/buildMultiTargeting/coverlet.msbuild.props b/src/coverlet.msbuild.tasks/buildMultiTargeting/coverlet.msbuild.props deleted file mode 100644 index ba0c4ed38..000000000 --- a/src/coverlet.msbuild.tasks/buildMultiTargeting/coverlet.msbuild.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/coverlet.msbuild.tasks/coverlet.msbuild.props b/src/coverlet.msbuild.tasks/coverlet.msbuild.props index 6642a929d..9403e7702 100644 --- a/src/coverlet.msbuild.tasks/coverlet.msbuild.props +++ b/src/coverlet.msbuild.tasks/coverlet.msbuild.props @@ -19,7 +19,6 @@ - $(MSBuildThisFileDirectory)..\tasks\net6.0\ - $(MSBuildThisFileDirectory)..\tasks\netstandard2.0\ + $(MSBuildThisFileDirectory)..\tasks\netstandard2.0\ diff --git a/src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj b/src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj index 07c991a4d..17332caa6 100644 --- a/src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj +++ b/src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj @@ -2,7 +2,7 @@ Library - netstandard2.0;net6.0 + netstandard2.0 coverlet.msbuild.tasks true $(TargetsForTfmSpecificContentInPackage);PackBuildOutputs @@ -55,9 +55,6 @@ Always - - Always - Always diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index 30e3bcaad..b181fcf29 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -14,8 +14,7 @@ This is required when the coverlet.msbuild imports are made in their src directory (so that msbuild eval works even before they are built) so that they can still find the tooling that will be built by the build. --> - $(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_net6.0\ - $(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_netstandard2.0\ + $(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_netstandard2.0\ diff --git a/test/coverlet.integration.determisticbuild/coverlet.integration.determisticbuild.csproj b/test/coverlet.integration.determisticbuild/coverlet.integration.determisticbuild.csproj index 584a6fef6..af3dd09ac 100644 --- a/test/coverlet.integration.determisticbuild/coverlet.integration.determisticbuild.csproj +++ b/test/coverlet.integration.determisticbuild/coverlet.integration.determisticbuild.csproj @@ -12,7 +12,6 @@ https://api.nuget.org/v3/index.json; $(RepoRoot)artifacts/package/$(Configuration.ToLowerInvariant()) - true