Failure using ilasm, but no reason given

徘徊边缘 提交于 2021-02-08 03:34:46

问题


I am trying to use ILASM and the process seems to abort with the following message:

***** FAILURE *****

How can I find out why it has failed? Can I turn on verbose messages or is there a log file I can look at?


回答1:


While I realise that this is probably too late to help the question author now, I will leave these details here in case it helps someone in the future.

I had a similar problem recently where Ildasm would enable me to disassemble some DLLs to ILs, but Ilasm would not let me reassemble them into DLLs. Like the question author, my console output was very unhelpful, just stating:

***** FAILURE *****

But without any reasons listed.

In my case, it was a simple error, where I had copied my Strong Name Key file into the wrong directory. After I realised and put it into the correct location, Ilasm could access it successfully and was therefore able to reassemble my DLLs.

I think that it is a real shame that this basic error wasn't mentioned in an error output... it's one of the first things that I could think had gone wrong... or maybe that's why it wasn't listed... because it was easily fixed?


UPDATE >>>

One way that you can tell if you have this exact problem or not, is to look at the Console Window output... with no valid Strong Name Key file, Ilasm stops at the end of the Assembled method ... section, eg. every line will have the following (or similar) on it:

Assembled method Namespace.SubNamespace.ClassName::MethodName

If your output has the following lines in it then you probably have a different problem to this one as it should be missing from the output when there is no Strong Name Key file:

Creating PE file   

Emitting classes:



回答2:


The reason for failure when I ran ilasm.exe was that folder names included in the path to the .il file contained spaces.

Placing double quotes around the entire path is the solution.




回答3:


ilasm output so many crap info, just redirect them.

run 'ilasm.exe ..... > 1.txt', you will see the truth.



来源:https://stackoverflow.com/questions/17984054/failure-using-ilasm-but-no-reason-given

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!