Skip to content

Commit 892d86e

Browse files
daveMuellerDavid Mueller x
andauthored
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 <[email protected]>
1 parent 6bd8783 commit 892d86e

File tree

8 files changed

+6
-15
lines changed

8 files changed

+6
-15
lines changed

Documentation/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Fixed
1010
- Threshold-stat triggers error [#1634](https://github.com/coverlet-coverage/coverlet/issues/1634)
1111
- Fixed coverlet collector 6.0.1 requires dotnet sdk 8 [#1625](https://github.com/coverlet-coverage/coverlet/issues/1625)
12+
- Type initializer errors after updating from 6.0.0 to 6.0.1 [#1629](https://github.com/coverlet-coverage/coverlet/issues/1629)
1213
- Exception when multiple exclude-by-attribute filters specified [#1624](https://github.com/coverlet-coverage/coverlet/issues/1624)
1314

1415
### Improvements

src/coverlet.collector/coverlet.collector.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
44
<AssemblyTitle>coverlet.collector</AssemblyTitle>
55
<DevelopmentDependency>true</DevelopmentDependency>
66
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

src/coverlet.core/coverlet.core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Library</OutputType>
5-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

src/coverlet.msbuild.tasks/buildMultiTargeting/coverlet.msbuild.props

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/coverlet.msbuild.tasks/coverlet.msbuild.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<ExcludeAssembliesWithoutSources Condition="$(ExcludeAssembliesWithoutSources) == ''"></ExcludeAssembliesWithoutSources>
2020
</PropertyGroup>
2121
<PropertyGroup>
22-
<CoverletToolsPath Condition="'$(CoverletToolsPath)' == '' and '$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tasks\net6.0\</CoverletToolsPath>
23-
<CoverletToolsPath Condition="'$(CoverletToolsPath)' == '' and '$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tasks\netstandard2.0\</CoverletToolsPath>
22+
<CoverletToolsPath Condition=" '$(CoverletToolsPath)' == '' ">$(MSBuildThisFileDirectory)..\tasks\netstandard2.0\</CoverletToolsPath>
2423
</PropertyGroup>
2524
</Project>

src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Library</OutputType>
5-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
66
<AssemblyTitle>coverlet.msbuild.tasks</AssemblyTitle>
77
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
88
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
@@ -55,9 +55,6 @@
5555
<None Include="coverlet.msbuild.props" Pack="true" PackagePath="build\">
5656
<CopyToOutputDirectory>Always</CopyToOutputDirectory >
5757
</None>
58-
<None Include="buildMultiTargeting\coverlet.msbuild.props" Pack="true" PackagePath="buildMultiTargeting\">
59-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
60-
</None>
6158
<None Include="coverlet.msbuild.targets" Pack="true" PackagePath="build\">
6259
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
6360
</None>

test/Directory.Build.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
This is required when the coverlet.msbuild imports are made in their src directory
1515
(so that msbuild eval works even before they are built)
1616
so that they can still find the tooling that will be built by the build. -->
17-
<CoverletToolsPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_net6.0\</CoverletToolsPath>
18-
<CoverletToolsPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_netstandard2.0\</CoverletToolsPath>
17+
<CoverletToolsPath>$(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_netstandard2.0\</CoverletToolsPath>
1918
</PropertyGroup>
2019
</When>
2120
</Choose>

test/coverlet.integration.determisticbuild/coverlet.integration.determisticbuild.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
https://api.nuget.org/v3/index.json;
1313
$(RepoRoot)artifacts/package/$(Configuration.ToLowerInvariant())
1414
</RestoreSources>
15-
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
1615
</PropertyGroup>
1716

1817
<ItemGroup>

0 commit comments

Comments
 (0)