{"id":14063517,"url":"https://github.com/UltraAlex00/Powershell-Dll-Compiler","last_synced_at":"2025-07-29T15:33:48.575Z","repository":{"id":190288867,"uuid":"682262263","full_name":"UltraAlex00/Powershell-Dll-Compiler","owner":"UltraAlex00","description":"Compiles a powershell class into a C# .dll or .cs","archived":false,"fork":false,"pushed_at":"2023-10-07T17:35:51.000Z","size":48,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-04T01:34:01.657Z","etag":null,"topics":["compiler","csharp","dll","powershell","powershell-module","ps2dll"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UltraAlex00.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}},"created_at":"2023-08-23T19:44:58.000Z","updated_at":"2024-08-18T05:28:47.000Z","dependencies_parsed_at":"2024-02-04T20:27:16.513Z","dependency_job_id":"17f8ea06-37f9-4cfa-96d1-4e7df8d7d370","html_url":"https://github.com/UltraAlex00/Powershell-Dll-Compiler","commit_stats":null,"previous_names":["ultraalex00/powershell-dll-compiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UltraAlex00/Powershell-Dll-Compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltraAlex00%2FPowershell-Dll-Compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltraAlex00%2FPowershell-Dll-Compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltraAlex00%2FPowershell-Dll-Compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltraAlex00%2FPowershell-Dll-Compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UltraAlex00","download_url":"https://codeload.github.com/UltraAlex00/Powershell-Dll-Compiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UltraAlex00%2FPowershell-Dll-Compiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709623,"owners_count":24131923,"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-07-29T02:00:12.549Z","response_time":2574,"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":["compiler","csharp","dll","powershell","powershell-module","ps2dll"],"created_at":"2024-08-13T07:03:22.703Z","updated_at":"2025-07-29T15:33:48.280Z","avatar_url":"https://github.com/UltraAlex00.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# Powershell Dll Compiler\nTranslates a `Powershell Class` into a `C# Class` and then compiles it. This class can be referenced across all .NET Languages.\nProject is currently in **alpha** state, so there will be some bugs. Please Report them!!\n\nDiscord: ultraalex0\n\n# Installation\nThis Project can be found on the [Powershell Gallery](https://www.powershellgallery.com/packages/PSDllCompiler) and can be installed with the command:\n```powershell\nInstall-Module PSDllCompiler\n```\n\n# Usage\nLets say you have a Class in example.ps1:\n```powershell\nusing namespace System.Windows.Forms #namespaces can be used if needed\n\nclass ExampleClass {\n\n  [string]$Name\n\n  [string] GreetMe() {\n\n    return \"Hello $($this.Name)\"\n  }\n\n  [int] Add([int]$Num1, [int]$Num2) {\n\n    return $Num1 + $Num2\n  }\n}\n```\nNow compile it with:\n```powershell\nCompile-Dll -Path .\\example.ps1 -OutputAssembly .\\example.dll\n```\nYour dll can now be imported in other **powershell projecs** using:\n```powershell\nusing assembly example.dll #option 1\nAdd-Type -Path example.dll #option 2\n[Reflection.Assembly]::LoadFile(\"example.dll\") #option 3\n```\nIn **.NET Projects** by simply adding the dll to the references, installing the NuGet package \"`Microsoft.PowerShell.SDK`\" and importing it using:\n```CSharp\n//C#\n\nusing static ExampleClass;\n```\n# Module References\nYou can use functions from other modules by referencing them\n```Powershell\n#include PSDllCompiler  \u003c---------\n\nclass CompilerTest {\n\n  static [void] Compile([string]$input, [string]$output) {\n\n    Compile-Dll -Path $input -OutputAssembly $output\n  }  \n}\n```\nor using the argument `-ModuleReferences @(\"PSDllCompiler\")`\n\n# v1.0.2-beta - 7.10.2023\n* Added support for multiple classes\n* Added support for Write-Host, Write-Warning\n* Added argument -SkipUpdate\n* Fixed method-property sync (temporary fix)\n* Improved ClassHandler_Powershell\n### Next Update\n* independent property sync\n### High Priority\n* partial classes\n### Low Priority\n* Read-Host\n* class namespaces\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUltraAlex00%2FPowershell-Dll-Compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUltraAlex00%2FPowershell-Dll-Compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUltraAlex00%2FPowershell-Dll-Compiler/lists"}