Skip to content

Commit

Permalink
Fix TypeInitializer issue (#1636)
Browse files Browse the repository at this point in the history
* core back to standard, change of condition to msbuild props

* update change log

* only netstandard

* nit

* nit

---------

Co-authored-by: David Mueller x <david.x.mueller@getinge.com>
  • Loading branch information
daveMueller and David Mueller x authored Mar 8, 2024
1 parent 6bd8783 commit 892d86e
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions Documentation/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/coverlet.collector/coverlet.collector.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyTitle>coverlet.collector</AssemblyTitle>
<DevelopmentDependency>true</DevelopmentDependency>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down
2 changes: 1 addition & 1 deletion src/coverlet.core/coverlet.core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/coverlet.msbuild.tasks/coverlet.msbuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<ExcludeAssembliesWithoutSources Condition="$(ExcludeAssembliesWithoutSources) == ''"></ExcludeAssembliesWithoutSources>
</PropertyGroup>
<PropertyGroup>
<CoverletToolsPath Condition="'$(CoverletToolsPath)' == '' and '$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tasks\net6.0\</CoverletToolsPath>
<CoverletToolsPath Condition="'$(CoverletToolsPath)' == '' and '$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tasks\netstandard2.0\</CoverletToolsPath>
<CoverletToolsPath Condition=" '$(CoverletToolsPath)' == '' ">$(MSBuildThisFileDirectory)..\tasks\netstandard2.0\</CoverletToolsPath>
</PropertyGroup>
</Project>
5 changes: 1 addition & 4 deletions src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyTitle>coverlet.msbuild.tasks</AssemblyTitle>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
Expand Down Expand Up @@ -55,9 +55,6 @@
<None Include="coverlet.msbuild.props" Pack="true" PackagePath="build\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory >
</None>
<None Include="buildMultiTargeting\coverlet.msbuild.props" Pack="true" PackagePath="buildMultiTargeting\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="coverlet.msbuild.targets" Pack="true" PackagePath="build\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
3 changes: 1 addition & 2 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
<CoverletToolsPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_net6.0\</CoverletToolsPath>
<CoverletToolsPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_netstandard2.0\</CoverletToolsPath>
<CoverletToolsPath>$(RepoRoot)artifacts\bin\coverlet.msbuild.tasks\$(Configuration.ToLowerInvariant())_netstandard2.0\</CoverletToolsPath>
</PropertyGroup>
</When>
</Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
https://api.nuget.org/v3/index.json;
$(RepoRoot)artifacts/package/$(Configuration.ToLowerInvariant())
</RestoreSources>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 892d86e

Please sign in to comment.