Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net 5 support #134

Merged
merged 1 commit into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ jobs:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- task: UseDotNet@2
inputs:
version: '3.1.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '3.0.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '2.2.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '2.1.x'
packageType: runtime
- bash: |
./build.sh
displayName: 'Build'
Expand All @@ -34,6 +50,22 @@ jobs:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- task: UseDotNet@2
inputs:
version: '3.1.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '3.0.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '2.2.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '2.1.x'
packageType: runtime
- bash: |
./build.sh
displayName: 'Build'
Expand All @@ -45,6 +77,22 @@ jobs:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- task: UseDotNet@2
inputs:
version: '3.1.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '3.0.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '2.2.x'
packageType: runtime
- task: UseDotNet@2
inputs:
version: '2.1.x'
packageType: runtime
- bash: |
./build.sh
displayName: 'Build'
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -r coverage || true
dotnet build

echo "# Start Instrument"
./minicover.sh instrument --assemblies "**/netcoreapp3.0/**/*.dll" --tests ""
./minicover.sh instrument --assemblies "**/net5.0/**/*.dll" --tests ""
echo "# End Instrument"

./minicover.sh reset
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.403"
"version": "5.0.100"
}
}
16 changes: 8 additions & 8 deletions src/MiniCover/MiniCover.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp3.0;netcoreapp2.2;netcoreapp2.1</TargetFrameworks>
<PackAsTool>true</PackAsTool>
<ToolCommandName>minicover</ToolCommandName>
<PackageOutputPath>../../nupkg</PackageOutputPath>
Expand All @@ -25,14 +25,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.3" />
<PackageReference Include="Mono.Cecil" Version="0.11.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0" />
<PackageReference Include="Mono.Cecil" Version="0.11.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="11.0.4" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions tests/MiniCover.UnitTests/Instrumentation/AsyncMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ .locals init (MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0
IL_0000: newobj System.Void MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.0 // this
IL_0008: stfld MiniCover.UnitTests.Instrumentation.AsyncMethod/Class MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0::<>4__this
IL_000d: ldloc.0
IL_000e: call System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Int32>::Create()
IL_0013: stfld System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Int32> MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0::<>t__builder
IL_0007: call System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Int32>::Create()
IL_000c: stfld System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Int32> MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0::<>t__builder
IL_0011: ldloc.0
IL_0012: ldarg.0 // this
IL_0013: stfld MiniCover.UnitTests.Instrumentation.AsyncMethod/Class MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0::<>4__this
IL_0018: ldloc.0
IL_0019: ldc.i4.m1
IL_001a: stfld System.Int32 MiniCover.UnitTests.Instrumentation.AsyncMethod/Class/<Method>d__0::<>1__state
Expand Down
14 changes: 7 additions & 7 deletions tests/MiniCover.UnitTests/MiniCover.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.3.1" />
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="11.0.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Moq" Version="4.15.1" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MiniCover\MiniCover.csproj" />
Expand Down