1

I have a prebuilt dll assembly that I am trying to use. It is a winforms library and when I reference it I can use it in the designer/code without error. When I run it I get:

Assembly generation failed -- Referenced assembly 'YARTE' does not have a strong name

I decided to do the ildasm => ilasm round trip but I keep getting this error

C:\...\bin>ilasm /dll /key=mykey.snk YARTE.dll

Microsoft (R) .NET Framework IL Assembler.  Version 4.0.30319.17929
Copyright (c) Microsoft Corporation.  All rights reserved.
Assembling 'YARTE.dll'  to DLL --> 'YARTE.dll'
Source file is ANSI

YARTE.dll(1) : error : syntax error at token 'MZ' in: ZÉ

I'm not finding much help elsewhere but I don't think this is a rare problem.

Cameron Scully
  • 103
  • 1
  • 12

1 Answers1

3

Why are you trying to compile the yarte DLL file? ilasm should take an IL source file.

It's not really a round trip if you ignore the output of ildasm :-)

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
  • Turns out i did have IL as source the first time but had another command error. Then everytime after that I was using the .dll >_< I'm a noob, deleting this question – Cameron Scully Dec 06 '12 at 23:51
  • 1
    @CameronScully, I'd only delete it if you're relatively sure it won't help anyone else in the future. That's a judgement call on your part. Based on a cursory search, this isn't a _totally_ unique experience (http://forums.asp.net/t/1496257.aspx/2/10) so it may be worth leaving it alone since someone is likely to search for `"syntax error at token MZ"` and find this exact Q&A. – paxdiablo Dec 07 '12 at 00:49