csMACnz / Coveralls.net-Samples

Sample Coveralls.net projects as reference for how it is used.
22 stars 21 forks source link

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. #10

Open hsluoyz opened 5 years ago

hsluoyz commented 5 years ago

Hi, I'm using the template of .Net Core + xUnit + OpenCover + Appveyor Branch. And I encountered the error:

Attempting to gather dependency information for package 'OpenCover.4.6.166' with respect to project 'packages', targeting 'Any,Version=v0.0'
Gathering dependency information took 511.76 ms
Attempting to resolve dependencies for package 'OpenCover.4.6.166' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'OpenCover.4.6.166'
Resolved actions to install package 'OpenCover.4.6.166'
Retrieving package 'OpenCover 4.6.166' from 'nuget.org'.
  GET https://api.nuget.org/v3-flatcontainer/opencover/4.6.166/opencover.4.6.166.nupkg
  OK https://api.nuget.org/v3-flatcontainer/opencover/4.6.166/opencover.4.6.166.nupkg 28ms
Installing OpenCover 4.6.166.
Adding package 'OpenCover.4.6.166' to folder 'C:\projects\casbin-net\packages'
Added package 'OpenCover.4.6.166' to folder 'C:\projects\casbin-net\packages'
Successfully installed 'OpenCover 4.6.166' to packages
Executing nuget actions took 977.08 ms
You can invoke the tool using the following command: csmacnz.Coveralls
Tool 'coveralls.net' (version '1.0.0') was successfully installed.
Executing: C:\Program Files\dotnet\dotnet.exe
xUnit.net Console Runner (64-bit .NET Core 4.6.26614.01)
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Committing...
No results, this could be for a number of reasons. The most common reasons are:
    1) missing PDBs for the assemblies that match the filter please review the
    output file and refer to the Usage guide (Usage.rtf) about filters.
    2) the profiler may not be registered correctly, please refer to the Usage
    guide and the -register switch.
Usage:
  csmacnz.Coveralls (--opencover | --dynamiccodecoverage | --monocov | --exportcodecoverage | --chutzpah | --lcov | --ncover | --reportgenerator | --multiple) -i ./opencovertests.xml (--repoToken <repoToken> | [--repoTokenVariable <repoTokenVariable>]) [-o ./opencovertests.json] [--dryrun] [--useRelativePaths [--basePath <path>] ] [--commitId <commitId> --commitBranch <commitBranch> [--commitAuthor <commitAuthor> --commitEmail <commitEmail> --commitMessage <commitMessage>] ] [--jobId <jobId>] [--serviceName <Name>] [--serviceNumber <Number>] [--pullRequest <pullRequestId>] [--treatUploadErrorsAsWarnings] [--parallel]
  csmacnz.Coveralls --version
  csmacnz.Coveralls --help
Command exited with code 1

My project is: https://github.com/casbin/Casbin.NET. It contains two projects:

  1. NetCasbin: netstandard2.0, the core library
  2. NetCasbin.UnitTest: netcoreapp2.1, the test cases

The Appveyor console is: https://ci.appveyor.com/project/hsluoyz/casbin-net

I don't know how to solve it, can you help me? Thanks!