{"id":21900243,"url":"https://github.com/cryptoc1/lc-plugin-sdk","last_synced_at":"2025-10-09T09:31:45.261Z","repository":{"id":213228393,"uuid":"733322348","full_name":"Cryptoc1/lc-plugin-sdk","owner":"Cryptoc1","description":"An MSBuild Sdk for creating Lethal Company mods.","archived":false,"fork":false,"pushed_at":"2024-01-08T22:54:50.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T17:49:22.931Z","etag":null,"topics":["bepinex","dotnet","lethal-company","thunderstore"],"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/Cryptoc1.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":"2023-12-19T04:17:43.000Z","updated_at":"2024-01-04T12:12:26.000Z","dependencies_parsed_at":"2024-01-08T23:42:36.145Z","dependency_job_id":null,"html_url":"https://github.com/Cryptoc1/lc-plugin-sdk","commit_stats":null,"previous_names":["cryptoc1/lc-plugin-sdk"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Cryptoc1/lc-plugin-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cryptoc1%2Flc-plugin-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cryptoc1%2Flc-plugin-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cryptoc1%2Flc-plugin-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cryptoc1%2Flc-plugin-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cryptoc1","download_url":"https://codeload.github.com/Cryptoc1/lc-plugin-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cryptoc1%2Flc-plugin-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001135,"owners_count":26083022,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bepinex","dotnet","lethal-company","thunderstore"],"created_at":"2024-11-28T15:06:54.290Z","updated_at":"2025-10-09T09:31:44.947Z","avatar_url":"https://github.com/Cryptoc1.png","language":"C#","readme":"# LethalCompany.Plugin.Sdk\n[![NuGet](https://img.shields.io/nuget/vpre/LethalCompany.Plugin.Sdk)](https://www.nuget.org/packages/LethalCompany.Plugin.Sdk)\n[![Build](https://img.shields.io/github/actions/workflow/status/cryptoc1/lc-plugin-sdk/default.yml)](https://github.com/cryptoc1/lc-plugin-sdk/actions/workflows/default.yml)\n![Language](https://img.shields.io/github/languages/top/cryptoc1/lc-plugin-sdk)\n\n\nAn [MSBuild Sdk](https://learn.microsoft.com/en-us/visualstudio/msbuild/how-to-use-project-sdk?view=vs-2022) for creating Lethal Company mods that:\n\n- Optimizes Build Defaults\n- Enables Modern Language Features with [`PolySharp`](https://github.com/Sergio0694/PolySharp)\n- References Publicized Binaries from [`LethalAPI.GameLibs`](https://github.com/dhkatz/LethalAPI.GameLibs)\n- References BepInEx packages from the [BepInEx Registry](https://nuget.bepinex.dev/)\n- Creates Thunderstore Packages with `dotnet publish`\n- Stages plugins to local a Thunderstore profile\n- And More...\n\n\n## Usage\n\nTo start using the Sdk, create a new Class Library:\n```bash\n$ dotnet new classlib -n {NAME}\n```\n\nIn the new `.csproj`, update the `Sdk=\"Microsoft.NET.Sdk\"` attribute at the top of the file to `Sdk=\"LethalCompany.Plugin.Sdk/{VERSION}\"`, and replace any existing content with metadata about the plugin:\n```xml\n\u003cProject Sdk=\"LethalCompany.Plugin.Sdk/1.0.0\"\u003e\n  \n  \u003cPropertyGroup\u003e\n    \u003cTitle\u003ePlugin Example\u003c/Title\u003e\n    \u003cDescription\u003eMy example plugin!\u003c/Description\u003e\n    \u003cPluginId\u003eexample.plugin\u003c/PluginId\u003e\n    \u003cVersion\u003e1.0.0\u003c/Version\u003e\n  \u003c/PropertyGroup\u003e\n\n\u003c/Project\u003e\n```\n\nAdd a new `.cs` file, and define the plugin:\n```csharp\n[BepInPlugin(GeneratedPluginInfo.Identifier, GeneratedPluginInfo.Name, GeneratedPluginInfo.Version)]\npublic sealed class SamplePlugin : BaseUnityPlugin\n{\n    // ...\n}\n```\n\u003e _The Sdk generates a `GeneratedPluginInfo` class from the metadata provided in your project for usage in code._\n\u003e \n\u003e _The name of the generated class can be changed using the `\u003cPluginInfoTypeName /\u003e` MSBuild property._\n\u003e\n\u003e _By default, the generated class is `internal static`, this can be changed using the `\u003cPluginInfoTypeAccessModifier /\u003e` MSBuild property._\n\n\n### Publish to Thunderstore\n\n\u003e _In order to create a Thunderstore Package, the Sdk requires that `icon.png` and `README.md` files exist at the project root._\n\n\u003e _The location of the `CHANGELOG.md` and `README.md` files can be customized using the `\u003cPluginChangelogFile /\u003e` and `\u003cPluginReadMeFile /\u003e` MSBuild properties._\n\nIn the `.csproj` of the plugin, provide the metadata used to generate a `manifest.json` for publishing:\n```xml\n\u003cProject Sdk=\"LethalCompany.Plugin.Sdk/1.0.0\"\u003e\n  \n  \u003cPropertyGroup\u003e\n    \u003c!-- ... --\u003e\n\n    \u003cDescription\u003eMy example plugin!\u003c/Description\u003e\n    \u003cThunderId\u003eExamplePlugin\u003c/ThunderId\u003e\n    \u003cThunderWebsiteUrl\u003ehttps://example.com\u003c/ThunderWebsiteUrl\u003e\n    \u003cVersion\u003e1.0.0\u003c/Version\u003e\n  \u003c/PropertyGroup\u003e\n\n  \u003cItemGroup\u003e\n    \u003cThunderDependency Include=\"ExampleTeam-OtherPlugin-1.0.0\" /\u003e\n  \u003c/ItemGroup\u003e\n\n\u003c/Project\u003e\n```\n\nThe following `manifest.json` would be generated for the example metadata:\n```json\n{\n  \"name\": \"ExamplePlugin\",\n  \"dependencies\": [\"BepInEx-BepInExPack-5.4.2100\", \"ExampleTeam-OtherPlugin-1.0.0\"],\n  \"description\": \"My example plugin!\",\n  \"version_number\": \"1.0.0\",\n  \"website_url\": \"https://example.com\"\n}\n```\n\nTo create a Thunderstore package, use `dotnet publish`:\n```\n$ dotnet publish -c Release\nMSBuild version 17.8.3+195e7f5a3 for .NET\n  Determining projects to restore...\n  All projects are up-to-date for restore.\n  ExamplePlugin -\u003e .\\bin\\Debug\\netstandard2.1\\ExamplePlugin.dll\n  ExamplePlugin -\u003e .\\bin\\Debug\\netstandard2.1\\publish\\\n  Zipping directory \".\\bin\\Debug\\netstandard2.1\\publish\\\" to \".\\bin\\Debug\\netstandard2.1\\ExamplePlugin-1.0.0.zi\n  p\".\n```\n\n#### Staging Plugins\n\n\"Staging\" a plugin refers to the process of publishing a plugin directly to a local Thunderstore profile, and is performed by specifiying the `PluginStagingProfile` MSBuild property when publishing:\n```bash\ndotnet publish -p:PluginStagingProfile=\"...\"\n```\n\n\u003e _It is recommended to set the `\u003cPluginStagingProfile /\u003e` MSBuild property in a `.csproj.user` file._\n\n#### Specify Thunderstore Dependencies\n\nTo specify Thunderstore dependencies in the generated `manifest.json`, use the `ThunderDependency` item:\n```xml\n\u003cItemGroup\u003e\n  \u003cThunderDependency Include=\"ExampleTeam-ExamplePlugin-1.0.0\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n\u003e _The Sdk specifies a default `ThunderDependency` on `BepInExPack`, specifying one yourself is unnecessary._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptoc1%2Flc-plugin-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptoc1%2Flc-plugin-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptoc1%2Flc-plugin-sdk/lists"}