{"id":16974750,"url":"https://github.com/3f/hmsbuild","last_synced_at":"2025-03-21T20:42:47.771Z","repository":{"id":52452805,"uuid":"87332897","full_name":"3F/hMSBuild","owner":"3F","description":".bat scripts with full Package Manager inside for searching and wrapping MSBuild tools. All Visual Studio and .NET Framework versions","archived":false,"fork":false,"pushed_at":"2024-10-27T22:53:05.000Z","size":263,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-26T15:25:29.117Z","etag":null,"topics":["bat-script","batch","batch-script","build","ci","distribution","embeddable","getnutool","hmsbuild","msbuild","msbuild-script","package-manager","portable","scripts","tools","visual-studio","vssbe","vssbe-scripts","vswhere"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","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/3F.png","metadata":{"files":{"readme":"Readme.md","changelog":"changelog.txt","contributing":null,"funding":".github/FUNDING.yml","license":"License.txt","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},"funding":{"custom":["3F.github.io/fund"]}},"created_at":"2017-04-05T16:36:45.000Z","updated_at":"2025-01-05T15:06:35.000Z","dependencies_parsed_at":"2024-10-27T23:23:44.234Z","dependency_job_id":"263bad75-f7fa-41ea-924a-bd24fc43a775","html_url":"https://github.com/3F/hMSBuild","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FhMSBuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FhMSBuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FhMSBuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3F%2FhMSBuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3F","download_url":"https://codeload.github.com/3F/hMSBuild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244868035,"owners_count":20523581,"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":["bat-script","batch","batch-script","build","ci","distribution","embeddable","getnutool","hmsbuild","msbuild","msbuild-script","package-manager","portable","scripts","tools","visual-studio","vssbe","vssbe-scripts","vswhere"],"created_at":"2024-10-14T01:07:54.386Z","updated_at":"2025-03-21T20:42:47.716Z","avatar_url":"https://github.com/3F.png","language":"Batchfile","funding_links":["3F.github.io/fund"],"categories":[],"sub_categories":[],"readme":"# [hMSBuild](https://github.com/3F/hMSBuild)\n\n*.bat* scripts with full [Package Manager](https://github.com/3F/GetNuTool) inside for searching and wrapping MSBuild tools. All *Visual Studio* and *.NET Framework* versions.\n\nYou do NOT need *powershell* or *dotnet-cli* or local [*vswhere.exe* [?]](https://github.com/Microsoft/vswhere/issues/41)\n\n```r\nCopyright (c) 2017-2024  Denis Kuzmin \u003cx-3F@outlook.com\u003e github/3F\n```\n\n[ 「 ❤ 」 ](https://3F.github.io/fund) [![License](https://img.shields.io/badge/License-MIT-74A5C2.svg)](https://github.com/3F/hMSBuild/blob/master/License.txt)\n[![Build status](https://ci.appveyor.com/api/projects/status/8ac1021k385eyubm/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/hmsbuild-github/branch/master)\n[![release](https://img.shields.io/github/release/3F/hMSBuild.svg)](https://github.com/3F/hMSBuild/releases/latest)\n[![GetNuTool](https://img.shields.io/badge/GetNuTool-v1.9-93C10B.svg)](https://github.com/3F/GetNuTool)\n\n\n```bat\nhMSBuild -only-path -no-vs -notamd64 -no-less-4\nhMSBuild -debug ~x ~c Release\nhMSBuild -GetNuTool \"Conari;regXwild;Fnv1a128\"\nhMSBuild -GetNuTool vsSolutionBuildEvent/1.16.1:../SDK \u0026 SDK\\GUI\nhMSBuild -cs -no-less-15 /t:Rebuild\n```\n\n**[Download](https://github.com/3F/hMSBuild/releases)** all editions: *Full, Minified, ...*\n\nOfficial Direct Links:\n\n* (Windows) Latest stable compiled batch-script [ [hMSBuild.bat](https://3F.github.io/hMSBuild/releases/latest/) ] `https://3F.github.io/hMSBuild/releases/latest/`\n\n\n## Why hMSBuild\n\n*because you need easy access to msbuild tools and more...* \n\nBased on [GetNuTool](https://github.com/3F/GetNuTool) and back in those days it was part of it like a small msbuild-helper inside.\n  But finally it was extracted into a new independent project after major changes from MS ecosystem with their products.\n\nToday's [hMSBuild](https://github.com/3F/hMSBuild) provides the most flexible way to access and preparing msbuild tools in different environments. You just specify what you need ... and hMSBuild prepares it for you.\n\n[![{Screencast - hMSBuild in action. Demo via RunIlAsm error}](https://raw.githubusercontent.com/3F/hMSBuild/master/resources/screencast_hMSBuild_in_action.jpg)](https://www.youtube.com/watch?v=zUejJ4vUPGw\u0026t=10)\n\n\n### Key Features\n\n* Single *.bat file, no less, no more.\n* Manage all versions, including before install-API/2017+\n* *Visual Studio* versions support: VS2022+, VS2019, VS2017, VS2015, VS2013, VS2012, VS2010\n* *.NET Framework* versions support: 4.0 (2010), 3.5, 2.0\n* Lightweight and text-based, about ~8 KB + ~11 KB\n* Does not require *powershell* or *dotnet-cli* or even local [*vswhere.exe* [?]](https://github.com/Microsoft/vswhere/issues/41)\n* Support hot updating / custom vswhere at any request for the most modern environments.\n* Provides some useful aliases.\n* Full [package manager](https://github.com/3F/GetNuTool) inside .bat to Create or Distribute using basic shell scripts;\n* Request to the server only if the package is not installed.\n* Support *packages.config* (+extra: output, sha1 if used unsecured channels ~windows xp).\n* Easy integration into any scripts such as pure batch-script [netfx4sdk](https://github.com/3F/netfx4sdk), [DllExport](https://github.com/3F/DllExport/wiki/DllExport-Manager)\n\n\n### hMSBuild's algorithm\n\nThe basic process is to provide the most suitable instance by explicitly eliminating unnecessary ones.\n\n**2.0+**\n\n* Versions: \n  * VS2022, ..., VS2017 ➟ VS2015, VS2013, ... ➟ .netfx\n* Instance Architecture (configure via `-notamd64` key): \n  * x64 ➟ x32\n\n* Extra restrictions via `-no-less-4` (Windows XP+), `-no-less-15` (install-API/2017+)\n* Priorities (configure via `-priority`, `-vc`, `cs`, `-stable`, ... keys). *Specific workload components in more priority than pre-release products. See [Issue #8](https://github.com/3F/hMSBuild/issues/8)*\n\n  1. Stable releases with selected workload components (C++ etc) ➟ Same via beta releases if allowed.\n  1. Stable releases with any available components ➟ Same via beta releases if allowed.\n\n## Syntax\n\nKeys to *hMSBuild* are optional. You can still command like it is official *msbuild.exe* *(MSBuild Tools)*.\n\n\u003e hMSBuild [keys to hMSBuild] [keys to msbuild.exe]\n\nFor example, \n\n* The *Clean* target in current directory: `hmsbuild /t:Clean`\n* Set property *Configuration* and *minimal* verbosity: `hmsbuild /p:Configuration=Debug /v:m`\n  * via hMSBuild it can also be like: `hmsbuild ~x ~c Debug`\n\nIn order to use [package manager](https://github.com/3F/GetNuTool),\n\n\u003e hMSBuild **-GetNuTool** keys to it ...\n\n* Get latest packages: `hmsbuild -GetNuTool \"Conari;regXwild;Fnv1a128\"`\n* Activate GUI script editor: `hMSBuild -GetNuTool vsSolutionBuildEvent/1.16.0:../SDK \u0026 SDK\\GUI`\n* Create new package: `hmsbuild -GetNuTool /t:pack /p:ngin=packages/Fnv1a128`\n\n### -... or /...\n\nMSBuild Tools supports both key format */...* and *-...*; hMSBuild, in turn, can override some of *-...*; in this case you need to use */...* for example,\n\n* */version* will be addressed to found MSBuild;\n* *-version* will be addressed to hMSBuild;\n\n### \"...\"\n\nAny value for specific key must be protected inside `\"...\"` if contains either whitespaces or delimiters like `;` For example:\n\n```bat\nhmsbuild ~p \"Any CPU\"\n```\n\n### -help\n\nFor the most up-to-date information, use `hMSBuild -h`\n\n```\nhMSBuild 2.4.0\nCopyright (c) 2017-2024  Denis Kuzmin \u003cx-3F@outlook.com\u003e github/3F\nCopyright (c) hMSBuild contributors https://github.com/3F/hMSBuild\n\nUnder the MIT License https://github.com/3F/hMSBuild\n\nSyntax: hMSBuild [keys to hMSBuild] [keys to MSBuild.exe or GetNuTool]\n\nKeys\n~~~~\n -no-vs        - Disable searching from Visual Studio.\n -no-netfx     - Disable searching from .NET Framework.\n -no-vswhere   - Do not search via vswhere.\n -no-less-15   - Do not include versions less than 15.0 (install-API/2017+)\n -no-less-4    - Do not include versions less than 4.0 (Windows XP+)\n\n -priority {IDs} - 15+ Non-strict components preference: C++ etc.\n                   Separated by space \"a b c\" https://aka.ms/vs/workloads\n\n -vswhere {v}\n  * 2.6.7 ...\n  * latest - To get latest remote vswhere.exe\n  * local  - To use only local\n            (.bat;.exe /or from +15.2.26418.1 VS-build)\n\n -no-cache         - Do not cache vswhere for this request.\n -reset-cache      - To reset all cached vswhere versions before processing.\n -cs               - Adds to -priority C# / VB Roslyn compilers.\n -vc               - Adds to -priority VC++ toolset.\n ~c {name}         - Alias to p:Configuration={name}\n ~p {name}         - Alias to p:Platform={name}\n ~x                - Alias to m:NUMBER_OF_PROCESSORS-1 v:m\n -notamd64         - To use 32bit version of found msbuild.exe if it's possible.\n -stable           - It will ignore possible beta releases in last attempts.\n -eng              - Try to use english language for all build messages.\n -GetNuTool {args} - Access to GetNuTool core. https://github.com/3F/GetNuTool\n -only-path        - Only display fullpath to found MSBuild.\n -force            - Aggressive behavior for -priority, -notamd64, etc.\n -vsw-as \"args...\" - Reassign default commands to vswhere if used.\n -debug            - To show additional information from hMSBuild\n -version          - Display version of hMSBuild.\n -help             - Display this help. Aliases: -? -h\n```\n\n## Integration with scripts\n\n### batch (.bat, .cmd)\n\nhMSBuild is a pure batch script. Therefore, you can easily combine this even inside other batch scripts. Or invoke this externally, there's nothing special:\n\n```bat\nset msbuild=hMSBuild -notamd64 ~c Release\n...\n%msbuild% Conari.sln /t:Rebuild\n```\n\n```bat\nfor /F \"tokens=*\" %%i in ('hMSBuild -only-path -notamd64') do set msbuild=\"%%i\"\n...\n%msbuild% /version\n```\n\n```bat\nhmsbuild -cs -no-less-15 ~c Debug ~x || goto fallback\n```\n\nMore actual examples can be found in [tests/](tests/) folder.\n\nNote: for some cases, if you know what you're doing, you can also configure *__p_call* flag to eliminate the difference for the call-type invoking *hMSBuild.bat*\n\n```bat\nset __p_call=1\n```\n\n\n## Build \u0026 Tests\n\nbuild and tests was based on batch and [vssbe](https://github.com/3F/vsSolutionBuildEvent) scripts. You don't need to do anything else, just build and test it\n\n```bat\nbuild \u0026 tests\n```\n\n### Build and Use from source\n\n```bat\ngit clone https://github.com/3F/hMSBuild.git src\ncd src \u0026 build \u0026 bin\\Release\\hMSBuild -help\n```\n\n### .sha1 official distribution\n\n*hMSBuild* releases are now accompanied by a *.sha1* file in the official distribution; At the same time, commits from which releases are published are signed with the committer's verified signature (GPG).\n\nMake sure you are using official, unmodified, safe versions.\n\nNote: *.sha1* file is a text list of published files with checksums in the format: \n\n`40-hexadecimal-digits` `\u003cspace\u003e` `file`\n\n```\neead8f5c1fdff2abd4da7d799fbbe694d392c792 path\\file\n...\n```\n\n## Contributing\n\n[*hMSBuild*](https://github.com/3F/hMSBuild) is waiting for your awesome contributions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3f%2Fhmsbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3f%2Fhmsbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3f%2Fhmsbuild/lists"}