Strong name errors running Roslyn from source on Azure

0

I am trying to run an Azure web role that uses the Microsoft.CodeAnalysis "Roslyn" library. Due to requiring features that were added since the most recent RC build available on NuGet, I am building the code from the GitHub repository I linked. I am performing the build by running the included cibuild.cmd script.

The code works fine when run from a command-line program, but when I run the web role either locally or on Azure, I get an error like

Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp.Features' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

Which makes sense... except sn.exe reports that verification is disabled for that public key. (EDIT: I checked its registry entries to confirm that is the case for both 64-bit and 32-bit code.) I also tried using the Roslyn FakeSign.exe utility to no effect.

How can I get a recent build of Roslyn to actually run in the context of a web role?

asp.net
.net
azure
roslyn
strongname
asked on Stack Overflow Jun 11, 2015 by perelman • edited Jun 11, 2015 by perelman

1 Answer

0

Make sure you run both the 32 and 64 bit versions of sn.exe.

Likely verification is skipped for 32 bit processes, but the web worker role runs as a 64 bit process.

answered on Stack Overflow Jun 11, 2015 by Kevin Pilch

User contributions licensed under CC BY-SA 3.0