{"id":18009863,"url":"https://github.com/kekyo/ilasm.managed","last_synced_at":"2025-03-26T14:31:32.561Z","repository":{"id":84090143,"uuid":"501588650","full_name":"kekyo/ILAsm.Managed","owner":"kekyo","description":"ILAsm.Managed - Portable managed Mono CIL assembler.","archived":false,"fork":false,"pushed_at":"2023-11-16T10:19:27.000Z","size":169,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T06:35:05.227Z","etag":null,"topics":["cil","ilasm","managed","mono","msil","portable"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kekyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-09T09:30:58.000Z","updated_at":"2025-02-14T07:58:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"85580bfd-e6eb-4947-b066-b1ed712153a2","html_url":"https://github.com/kekyo/ILAsm.Managed","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekyo%2FILAsm.Managed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekyo%2FILAsm.Managed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekyo%2FILAsm.Managed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekyo%2FILAsm.Managed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kekyo","download_url":"https://codeload.github.com/kekyo/ILAsm.Managed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245670726,"owners_count":20653411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cil","ilasm","managed","mono","msil","portable"],"created_at":"2024-10-30T02:11:20.360Z","updated_at":"2025-03-26T14:31:32.120Z","avatar_url":"https://github.com/kekyo.png","language":"C#","readme":"# ILAsm.Managed\n\n![ILAsm.Managed](Images/ILAsm.Managed.100.png)\n\nPortable managed Mono CIL assembler.\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\n| Package name | nuget.org |\n|:----|:----|\n| ilasm-cli | [![NuGet ilasm-cli](https://img.shields.io/nuget/v/ilasm-cli.svg?style=flat)](https://www.nuget.org/packages/ilasm-cli) |\n| ILAsm.Managed | [![NuGet ILAsm.Managed](https://img.shields.io/nuget/v/ILAsm.Managed.svg?style=flat)](https://www.nuget.org/packages/ILAsm.Managed) |\n| ILAsm.Managed.Core | [![NuGet ILAsm.Managed.Core](https://img.shields.io/nuget/v/ILAsm.Managed.Core.svg?style=flat)](https://www.nuget.org/packages/ILAsm.Managed.Core) |\n\n----\n\n## What is this?\n\nMono CIL assembler exactly ported to .NET, .NET Core and .NET Frameworks.\n\nTarget platforms:\n\n* .NET 8.0, 7.0, 6.0 and 5.0\n* .NET Core 3.1 and 2.2\n* .NET Standard 2.1 and 2.0\n* .NET Framework 4.8, 4.6.1, 4.5, 4.0, 3.5 and 2.0\n\nThere are two packages for this project, which can be used for different purposes:\n\n* [ilasm-cli](https://www.nuget.org/packages/ilasm-cli): Contains ported Mono ilasm executable (dotnet CLI interface).\n* [ILAsm.Managed](https://www.nuget.org/packages/ILAsm.Managed): Contains ported Mono ilasm executable (MSBuild scripting).\n* [ILAsm.Managed.Core](https://www.nuget.org/packages/ILAsm.Managed.Core): Pure library for ported Mono ilasm.\n\n\n----\n\n## ilasm-cli\n\n[ilasm-cli package](https://www.nuget.org/packages/ilasm-cli) suppors dotnet CLI interface.\nTry simply installation when you want to get ILAsm on the cli as follows:\n\n```bash\nC:\\\u003edotnet tool install -g ilasm-cli\nYou can invoke the tool using the following command: ilasm\nTool 'ilasm-cli' (version '1.1.0') was successfully installed.\n\nC:\\\u003eilasm\nMono IL assembler compiler\nilasm [options] source-files\n   --about            About the Mono IL assembler compiler\n   --version          Print the version number of the compiler\n   /output:file_name  Specifies output file.\n   /exe               Compile to executable.\n   /dll               Compile to library.\n   /debug             Include debug information.\n   /key:keyfile       Strongname using the specified key file\n   /key:@container    Strongname using the specified key container\n   /noautoinherit     Disable inheriting from System.Object by default\nOptions can be of the form -option or /option\n```\n\n----\n\n## ILAsm.Managed\n\nYou can refer to MSBuild symbols as properties with [ILAsm.Managed package](https://www.nuget.org/packages/ILAsm.Managed).\nUsing this property, you can easily run the command in safer multi-platform environment:\n\n```xml\n\u003c!-- Execute Mono ilasm CLI --\u003e\n\u003cExec Command=\"$(ILAsmManagedBuildToolingRuntimeName)\u0026quot;$(ILAsmManagedBuildToolingPath)\u0026quot; ....\" /\u003e\n```\n\n----\n\n## ILAsm.Managed.Core\n\nThis package contains up to just before the `Main` entry point.\nIt can be used directly in MSBuild custom tasks or when incorporating ILAsm into your own implementation.\nHowever, since the original implementation is made into a library as is, it may not be easy to handle.\n\nThe CLI entry point can be accomplished with a single line as follows:\n\n```csharp\nnamespace Mono.ILASM;\n\npublic static class Program\n{\n    public static int Main(string[] args) =\u003e\n        Driver.Main(args);\n}\n```\n\n----\n\n## Background\n\nThis is a further derivative project of [IL2C](https://github.com/kekyo/IL2C) and [ILCompose](https://github.com/kekyo/ILCompose).\nIn fact, the original authors are to be commended, as they simply ported the Mono ilasm artifact to a modern environment.\n\nCurrently (.NET 6), Microsoft's CoreCLR team is working on a port of the .NET Framework's ILAsm,\n[Microsoft.NETCore.ILAsm](https://www.nuget.org/packages/Microsoft.NETCore.ILAsm) and a set of derivative packages.\nThese include native binaries, i.e., binaries specific to Windows and Linux (different for each distribution).\n\nThere are [SDK scripts for IL](https://www.nuget.org/packages/Microsoft.NET.Sdk.IL) that reference these packages from the `\u003cPackageReference\u003e` tag.\nHowever, there is a fatal problem with this method.\nCommands such as `dotnet restore` and `nuget restore` do not evaluate the MSBuild scripts when resolving package references.\nTherefore, this package reference actually fails and the build always fails.\n\nNo, if you build from Visual Studio, you can build.\nSo I finally discovered this problem by failing to build with GitHub Actions.\nI thought of various solutions, but in the end, as long as ILAsm is native code,\nit is difficult (at least to an outsider) to fundamentally solve this problem.\n\nSo we looked into Mono's ILAsm and found that it was fully managed code, albeit clunky, so we decided to port it.\n\n----\n\n## License\n\nUnder MIT excepts original Mono source code, [see Mono License](https://github.com/mono/mono/blob/main/LICENSE).\n\n----\n\n## History\n\n* 1.2.0:\n  * Supported .NET 8.0 SDK.\n* 1.1.9:\n  * Supported .NET 8.0 RC2.\n* 1.1.0:\n  * Supported dotnet CLI installation.\n* 1.0.0:\n  * Initial release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkekyo%2Filasm.managed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkekyo%2Filasm.managed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkekyo%2Filasm.managed/lists"}