usql icon indicating copy to clipboard operation
usql copied to clipboard

Using Microsoft.Analytics.UnitTest.dll throws FileLoadException

Open thebothead opened this issue 7 years ago • 4 comments

Hello,

I am using VS2017 and trying to write unit tests using the Microsoft.Analytics.UnitTest.dll assembly to test a custom USQL extractor.

When I run my tests I get the following error:

System.IO.FileLoadException occurred
  HResult=0x80131045
  Message=Could not load file or assembly 'Microsoft.Analytics.UnitTest, Version=10.2.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3' 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)

Any help here would be appreciated.

Thanks!

thebothead avatar Oct 10 '17 16:10 thebothead

I'm seeing that here as well. It's a fresh USQL unit test project to test a custom extractor

dazfuller avatar Dec 04 '17 09:12 dazfuller

Just got it to work, managed this by switching the default processor architecture to x64.

Test > Test Settings > Default Processor Architecture > x64

dazfuller avatar Dec 04 '17 10:12 dazfuller

I've run into the same issue and changing the processor architecture did not solve the problem. I still get the following:

Message: Test method ********* threw exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Analytics.UnitTest, Version=10.2.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Other unit tests in the same assembly, not using the USqlStreamWriter, do not have this issue

rondefreitas avatar Dec 08 '17 14:12 rondefreitas

Odd, I just created a quick test which uses a USqlStreamWriter and it compiled and ran fine. Is there a chance you could share the project (or one like it that also fails) to have a look at?

dazfuller avatar Dec 11 '17 09:12 dazfuller