Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

[ILVerify] Add net46 as additional target framework #4862

Merged
merged 1 commit into from
Nov 2, 2017
Merged

[ILVerify] Add net46 as additional target framework #4862

merged 1 commit into from
Nov 2, 2017

Conversation

ArztSamuel
Copy link
Collaborator

This adds net46 as an additional target framework to ILVerify, as suggested in dotnet/roslyn#22872.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit 4d824e2 into dotnet:master Nov 2, 2017
@ArztSamuel ArztSamuel deleted the targetNet46 branch November 2, 2017 20:55
@jcouv
Copy link
Member

jcouv commented Nov 10, 2017

Thanks @ArztSamuel
The net46 ILVerify binaries that I build locally can now be referenced from Roslyn without trouble (much easier than the netcoreapp2.0 ones). The next issue I'm having is loading them.

When I execute a Roslyn test that attempts to call into ILVerify (I made some APIs public on my local corert repo), I get a type-load exception: System.IO.FileLoadException : Could not load file or assembly 'ILVerify, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

I tried a couple of things: disabling strong name checks on my machine (sn.exe -Vr *, which surprisingly did not resolve the issue), trying to sign ILVerify with "Open" key in corert, and a few variants. But no success so far.
Any ideas what I should try next? From the entry points to the code, I assume that you're using ILVerify as an executable, rather than a library, so maybe you haven't encountered this.

@jkotas
Copy link
Member

jkotas commented Nov 10, 2017

This looks like that the Roslyn test code is strong name signed. The .NET Framework loader requires that strong-name assemblies only reference other strong-name assemblies.

You either need to stop strong name signing Roslyn test code (that would the preferred solution), or get the ILVerify strongnamed using public signing to make .NET Framework loader happy.

@jcouv
Copy link
Member

jcouv commented Nov 10, 2017

Thanks. I'll try with Roslyn signing disabled.

@jcouv
Copy link
Member

jcouv commented Nov 10, 2017

Jared recommended strongly against disabling strong-naming in Roslyn on my dev box, as it creates more problems, but I figured out how to strong-name ILVerify and unblock myself. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants