ilasm

Modify the version information of a built .NET assembly

血红的双手。 提交于 2019-12-11 02:46:21
问题 Is there a better way to modify the version information of a .NET assembly of the one I am currently using. My current approach is the following. I do disassemble the assembly with ildasm : ildasm /nobar Riolo.WebUI.dll /out=Riolo.WebUI.il This will generated also a Riolo.WebUI.res compiled resource file, that I then open and modify with the user interface of Visual Studio, then I do reassemble the assembly back with ilasm : ilasm Riolo.WebUI.il /OUTPUT=Riolo.WebUI.dll /RESOURCE=Riolo.WebUI

How to declare a value type in CIL: `.class value` or just `.class`?

 ̄綄美尐妖づ 提交于 2019-12-07 07:49:41
问题 I have taken a look at a C# struct FooStruct in ILDASM, and have seen the following: ILDASM here displays two differing declarations: one starting with .class value public (rear window & front window's title bar) one starting with just .class public (front window) And I wonder which syntax (if not both) is the correct one for declaring a value type? Is the value modifier strictly necessary, or optional, or a syntax error? 回答1: Short answer: Value type definitions only require extends

Can you see the evaluation stack in mdbg?

我们两清 提交于 2019-12-06 05:09:39
Say I have the following CIL: ldc.i4 40 <- a breakpoint is set here ldc.i4.2 add box int32 call void [mscorlib]System.Console::WriteLine(string) I then use ilasm /debug main.il to assemble the exe and pdb files to use in mdbg. My question is, when I'm at say line 3, before the add operation is executed, I would want to see the evaluation stack which would show me the two int32 constants, 40 and 2, which I had loaded before. How can I view this evaluation stack in mdbg? I found the command that's needed to view the evaluation stack while debugging in mdbg: p[rint] . p[rint] prints local or

How to declare a value type in CIL: `.class value` or just `.class`?

南楼画角 提交于 2019-12-05 14:21:46
I have taken a look at a C# struct FooStruct in ILDASM , and have seen the following: ILDASM here displays two differing declarations: one starting with .class value public (rear window & front window's title bar) one starting with just .class public (front window) And I wonder which syntax (if not both) is the correct one for declaring a value type? Is the value modifier strictly necessary, or optional, or a syntax error? Short answer: Value type definitions only require extends [mscorlib]System.ValueType ; the value attribute appears to be optional and has no apparent effect. I assume that

.net-core: Equivalent of ILDASM / ILASM

为君一笑 提交于 2019-12-04 21:38:04
问题 Is there the equivalent of ILDASM / ILASM for the .net-core? Specifically, I'm looking for something that runs on Linux (Hence why the .net-core). 回答1: Both the ildasm and ilasm tools are built with CoreCLR from this repo: https://github.com/dotnet/coreclr. They include similar functionality as the versions shipped with Windows (sans GUI, etc.). There are nuget packages shipped that include them as well (https://www.nuget.org/packages?q=ildasm), but they are platform-specific and also require

.net-core: Equivalent of ILDASM / ILASM

心已入冬 提交于 2019-12-03 13:32:33
Is there the equivalent of ILDASM / ILASM for the .net-core? Specifically, I'm looking for something that runs on Linux (Hence why the .net-core). Both the ildasm and ilasm tools are built with CoreCLR from this repo: https://github.com/dotnet/coreclr . They include similar functionality as the versions shipped with Windows (sans GUI, etc.). There are nuget packages shipped that include them as well ( https://www.nuget.org/packages?q=ildasm ), but they are platform-specific and also require a matching version of CoreCLR to use, so they are not straightforward to consume via nuget. The easiest

Guaranteed way to find the filepath of the ildasm.exe and ilasm.exe files regardless of .NET version/environment?

若如初见. 提交于 2019-12-03 12:53:18
Is there a way to programmatically get the FileInfo/Path of the ildasm.exe/ilasm.exe executables? I'm attempting to decompile and recompile a dll/exe file appropriately after making some alterations to it (I'm guessing PostSharp does something similar to alter the IL after the compilation). I found a blog post that pointed to: var pfDir = Environment.GetFolderPath(Environment.SpecialFolders.ProgramFiles)); var sdkDir = Path.Combine(pfDir, @"Microsoft SDKs\Windows\v6.0A\bin"); ... However, when I ran this code the directory did not exist (mainly because my SDK version is 7.1), so on my local