question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency on Mono.Cecil 0.9.6 is not declared

See original GitHub issue

We have a custom test runner (not Visual Studio) to run NUnit tests. The unit-test project in system-under-test is targeting net472 and has the following package references:

    <PackageReference Include="NUnit" Version="3.12.0" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />

We end up with nunit.engine.dll 3.9.0.0 in the test output directory. nunit.engine.dll references Mono.Cecil.dll 0.9.6, but the NuGet package https://www.nuget.org/packages/NUnit3TestAdapter/3.15.1 neither declares a dependency on Cecil nor packs its own copy, nor ILRepacks to embed Cecil into nunit.engine.dll.

As a result if our test runner attempts to run tests from that directory the process crashes with Unable to load Mono.Cecil.dll 0.9.6.

If I understand this correctly, it would be better to use ILRepack to inline Cecil into nunit.engine.dll. It is better to inline Cecil because Cecil has changed the public key token between 0.9 and 0.10 and so binding redirects won’t work. Updating to the latest Cecil and declaring that dependency (or including Mono.Cecil.dll in the NuGet package) would work too.

How does this normally work? Does VS bring its own Cecil? Thanks!

@jnm2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
jcansdalecommented, Oct 18, 2019

BTW, it’s also possible to embed Cecil as a single source file this: https://gist.github.com/jcansdale/9eff65dda0eaaa6196f5ef737a569803

Not saying it’s a good thing, but it’s a thing. 😉

1reaction
KirillOsenkovcommented, Oct 18, 2019

It’s not public and I’m using reflection to call it, but don’t worry about breaking us. We’ll adapt.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0
When i'm trying to host and run locally through iis am getting following error. When am running website directly from visual studio to...
Read more >
Newest 'mono.cecil' Questions
I have a problem running my 1-click application. It stopped working with an error code "Application validation did not succeed". The problem is ......
Read more >
Conflict with mono.cecil.dll
I have another utility installed on my computer that has a newer version of mono.cecil.dll (0.9.5), and as a result I am getting...
Read more >
Fody: Mono.Cecil.Mdb assembly not found - Build/Test Issues
I am not using Nuget. And it does find the Fody assembly only the specific Mono.Cecil.Mdb can not be found. I use the...
Read more >
Mono.Cecil 0.9.6
Cecil is a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found