{"id":19003387,"url":"https://github.com/wertzui123/appbundle","last_synced_at":"2026-04-20T17:30:22.512Z","repository":{"id":116574150,"uuid":"333186851","full_name":"Wertzui123/AppBundle","owner":"Wertzui123","description":"AppBundle is a .NET library that can add resources to your application after its compilation","archived":false,"fork":false,"pushed_at":"2021-07-27T18:59:46.000Z","size":3113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-01T19:12:55.416Z","etag":null,"topics":["app","appbundle","bundle","compilation","csharp","net"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wertzui123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-01-26T19:01:54.000Z","updated_at":"2021-07-27T18:59:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"281b128a-d2ea-44f8-91fd-29f19c0dfc0e","html_url":"https://github.com/Wertzui123/AppBundle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wertzui123%2FAppBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wertzui123%2FAppBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wertzui123%2FAppBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wertzui123%2FAppBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wertzui123","download_url":"https://codeload.github.com/Wertzui123/AppBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240027412,"owners_count":19736209,"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":["app","appbundle","bundle","compilation","csharp","net"],"created_at":"2024-11-08T18:18:54.969Z","updated_at":"2026-04-20T17:30:22.466Z","avatar_url":"https://github.com/Wertzui123.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppBundle\nAppBundle is a .NET library that can add resources to your application after its compilation.\n\n# Installing...\n## ...the bundle generator\n### ... as a library\n1. Download the \u003ca href=\"binaries/AppBundle.dll?raw=true\"\u003eAppBundle.dll\u003c/a\u003e here\n2. Add the DLL to your application\n3. Use a code snippet similar to this to generate a bundle:\n    ```cs\n    var bundle = new AppBundle(\"App.exe\");\n    bundle.AddResource(\"ExampleString\", \"Hello World!\");\n    bundle.AddResource(\"Bytes\", new byte[] { (byte)42, (byte)24 });\n    bundle.AddResource(\"BasicAssembly\", assembly)\n    bundle.Generate();\n    ```\n\n### ... as a standalone application\n### Windows\n1. Download the \u003ca href=\"binaries/AppBundle.exe?raw=true\"\u003eAppBundle.exe\u003c/a\u003e here\n2. Place it where you need it\n3. Run a command similar to this:\n    ```\n    AppBundle.exe program.exe example=\"Hello World!\"\n    ```\n\n### Linux\n1. Download the \u003ca href=\"binaries/AppBundle?raw=true\"\u003eAppBundle executable\u003c/a\u003e here\n2. Place it where you need it\n3. Run a command similar to this:\n    ```\n    ./AppBundle program example=\"Hello World!\"\n    ```\n\n## ... the bundle loader\n1. Download the \u003ca href=\"binaries/AppBundleLoader.dll?raw=true\"\u003eAppBundleLoader.dll\u003c/a\u003e here\n2. Add the dll your application\n3. Call \u003ccode\u003eAppBundle.Loader.Main()\u003c/code\u003e at the start of your main method\n4. Move all code (except the code from step 3) in your main method to a new method and call that method from your main method (this is only needed if you bundle DLLs into your app):\n    ```cs\n    public static void Main()\n    {\n        AppBundle.Loader.Main();\n        // Your code\n    }\n    ```\n    becomes\n    ```cs\n    public static void Main()\n    {\n        AppBundle.Loader.Main();\n        Init();\n    }\n    \n    private static void Init()\n    {\n        // Your code\n    }\n    ```\n5. Use a code snippet similar to this to get the resources in your bundle:\n    ```cs\n    var resources = AppBundle.Loader.GetResources();\n    ```\nThe GetResources method returns a Dictionary\u003cstring, object\u003e with the name of a resource as the key and the resource as the value.\n\n# Limitations\nAppBundle does **not** work with files generated by mkbundle with the **--simple option**!\n\u003cbr\u003e\n\u003cbr\u003eYou also **cannot bundle the bundle loader** into your application **using AppBundle** to create a self-contained application.\n\u003cbr\u003eThis can be achieved by either using \u003ca href=\"https://www.mono-project.com/docs/tools+libraries/tools/mkbundle/\"\u003emkbundle\u003c/a\u003e or by:\n- Adding the AppBundleLoader.dll as a resource file\n- Pasting a code snippet similar to this in your main method:\n    ```cs\n    AppDomain.CurrentDomain.AssemblyResolve += (_, a) =\u003e\n    {\n        var assemblyName = new AssemblyName(a.Name).Name;\n        return assemblyName == \"AppBundleLoader\" ? Assembly.Load(Resources.AppBundleLoader) : null;\n    };\n    ```\n- Moving \u003ccode\u003eAppBundle.Loader.Main()\u003c/code\u003e to its own method and calling that method after step 2:\n    ```cs\n    public static void Main()\n    {\n        AppBundle.Loader.Main();\n        Init();\n    }\n    ```\n    becomes\n    ```cs\n    public static void Main()\n    {\n        InitLoader();\n        Init();\n    }\n    \n    private static void InitLoader()\n    {\n        AppBundle.Loader.Main();\n    }\n    \n    private static void Init()\n    {\n        // Your code\n    }\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwertzui123%2Fappbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwertzui123%2Fappbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwertzui123%2Fappbundle/lists"}