{"id":13450789,"url":"https://github.com/sammi/bazel-to-msbuild","last_synced_at":"2025-07-22T22:33:44.961Z","repository":{"id":45104005,"uuid":"325714149","full_name":"sammi/bazel-to-msbuild","owner":"sammi","description":"Generate visual studio solution from a bazel workspace.","archived":false,"fork":false,"pushed_at":"2022-01-19T22:02:30.000Z","size":1211,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T09:16:53.253Z","etag":null,"topics":["bazel","msbuild","visualstudio"],"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/sammi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-31T04:34:23.000Z","updated_at":"2025-04-04T11:42:43.000Z","dependencies_parsed_at":"2022-09-02T22:41:04.055Z","dependency_job_id":null,"html_url":"https://github.com/sammi/bazel-to-msbuild","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/sammi/bazel-to-msbuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammi%2Fbazel-to-msbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammi%2Fbazel-to-msbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammi%2Fbazel-to-msbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammi%2Fbazel-to-msbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sammi","download_url":"https://codeload.github.com/sammi/bazel-to-msbuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammi%2Fbazel-to-msbuild/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266585994,"owners_count":23952169,"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-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["bazel","msbuild","visualstudio"],"created_at":"2024-07-31T07:00:38.532Z","updated_at":"2025-07-22T22:33:44.934Z","avatar_url":"https://github.com/sammi.png","language":"C++","funding_links":[],"categories":["Tooling"],"sub_categories":["Project generators"],"readme":"bazel-to-msbuild\r\n----------------\r\n\r\nGenerate msbuild project from bazel project\r\n\r\n- [x] It is using ```bazel query ... output=proto``` to gather all cc_library, cc_binary, and cc_test packages;\r\n- [x] It generates one msbuild project for one target;\r\n- [x] It generates one solution for one bazel workspace;\r\n- [x] It detects target dependencies and manage them as project references in msbuild project;\r\n- [x] It detects Windows dll library and manage dll library as the application project reference;\r\n- [ ] It detects midl file and manage it by Midl task in project;\r\n\r\n# Install and Usage\r\n\r\nUnzip the tool and put it in your PATH\r\n```\r\nwget https://github.com/sammi/bazel-to-msbuild/releases/download/v0.2.11/b2m-0.2.11.zip\r\nunzip b2m-0.2.11.zip\r\n#On linux and/or Mac\r\ncd b2m\r\nchmod a+x b2m\r\n```\r\n\r\nRun the command:\r\n\r\n```\r\nb2m {your_bazel_workspace_dir} {your_solution_file_name}\r\n```\r\n\r\nGenerate project with static library\r\n```\r\ncd bazel-to-msbuild\\integration\\src\\test\\resources\\stage3\r\nb2m . app\r\n```\r\nThen you should be able to find msbuild solution and project files under stage3 folder:\r\n```\r\napp.sln\r\nlib\\hello-time.vcxproj\r\nlib\\hello-time.filters\r\nlib\\hello-time.user\r\nmain\\hello-greet.vcxproj\r\nmain\\hello-greet.filters\r\nmain\\hello-greet.user\r\nmain\\hello-world.vcxproj\r\nmain\\hello-world.filters\r\nmain\\hello-world.user\r\n```\r\nGenerate project with static library\r\n```\r\ncd bazel-to-msbuild\\integration\\src\\test\\resources\\dll\r\nb2m . app\r\n```\r\nThen you should be able to find msbuild solution and project files under dll folder:\r\n```\r\napp.sln\r\nclib\\clib.vcxproj\r\nclib\\clib.filters\r\nclib\\clib.user\r\nmain\\main.vcxproj\r\nmain\\main.filters\r\nmain\\main.user\r\n```\r\n\r\nThen Open app.sln by Visualstudio, set main as the startup project, you should be able to debug the application and its dll library clib.\r\n\r\n# Sample bazel projects\r\nWe have sample projects in our integration test resources folder, which can be built by bazel, and be converted to msbuild solution and projects.\r\n\r\nhttps://github.com/sammi/bazel-to-msbuild/tree/main/integration/src/test/resources\r\n\r\n  \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsammi%2Fbazel-to-msbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsammi%2Fbazel-to-msbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsammi%2Fbazel-to-msbuild/lists"}