{"id":34928,"date":"2024-11-12T23:10:37","date_gmt":"2024-11-12T23:10:37","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=34928"},"modified":"2024-11-12T23:10:37","modified_gmt":"2024-11-12T23:10:37","slug":"siemens-healthineers-manages-c-libraries-with-vcpkg-in-an-offline-build-environment","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/siemens-healthineers-manages-c-libraries-with-vcpkg-in-an-offline-build-environment\/","title":{"rendered":"Siemens Healthineers manages C++ libraries with vcpkg in an offline build environment"},"content":{"rendered":"<p><a href=\"https:\/\/learn.microsoft.com\/vcpkg\/get_started\/overview\">vcpkg is a free and open-source C\/C++ package manager<\/a> maintained by Microsoft and the C++ community that runs on Windows, macOS, and Linux. Over the years we have heard from companies using vcpkg to manage dependencies at enterprise-scale. For this blog post, I spoke to Shrey Chauhan, a Senior DevOps Engineer with Siemens Healthineers.<\/p>\n<p>Siemens Healthineers adopted vcpkg in late 2023 after a successful proof of concept. Their main motivation was to improve their <strong>versioning<\/strong> and overall dependency management for C++ libraries in their <strong>offline, air-gapped build environment<\/strong>. They also like vcpkg\u2019s integration with the Visual Studio IDE, extensive and evolving library support, and automatic dependency resolution.<\/p>\n<h1>About Siemens Healthineers and development team<\/h1>\n<p><strong>Shrey:<\/strong> The Ultrasound business area is an integral part of Siemens Healthineers. This advanced medical device features a comprehensive hardware layer and a full-stack windows-based software layer. Ultrasound Software teams handle the development of the entire software stack, while the DevOps team manages CI\/CD processes, including building, packaging, deployment, and related tools.<\/p>\n<h1>C++ development environment<\/h1>\n<p>Siemens Healthineers develops on Windows and targets Windows x64. They use Visual Studio 2022 with MSBuild projects, and their project is a combination of C#, C++\/CLI, and C++. They have around 300 developers maintaining over 6 million lines of code. In addition, they use Azure DevOps as their continuous integration system.<\/p>\n<h1>How they were managing C++ dependencies before vcpkg<\/h1>\n<p>Their team mostly consumes open-source dependencies. They were previously packaging the C++ dependencies in individual .zip packages, which were being downloaded from a JFrog Artifactory repository. This is a tedious process because the path to each .dll or .lib needs to be correct and could vary based on the package.<\/p>\n<h1>Q: When did your team move to vcpkg and why did you ultimately choose to move to vcpkg?<\/h1>\n<p><strong>Shrey:<\/strong> We moved to vcpkg around September or October 2023 with the main reasoning being <strong>improved versioning and dependency management<\/strong> of C++ libraries. We did a proof of concept to determine if it suited our needs with respect to our <strong>air-gapped build environment<\/strong>, which was successful after a little help from vcpkg team. Additional features we benefitted from:<\/p>\n<ol>\n<li>vcpkg is <strong>well integrated with Visual Studio IDE<\/strong><\/li>\n<li>Has <strong>extensive library support<\/strong>, which is still evolving<\/li>\n<li><strong>Automatic dependency resolution<\/strong><\/li>\n<\/ol>\n<p>In Siemens Ultrasound, our builds\/CI are on a protected network with restricted access to the Internet. By default, vcpkg downloads packages from source repositories (Internet) which did not work for us because of access restrictions. We were able to work with the vcpkg team to integrate custom <strong>Asset Caching<\/strong> (which was later documented under: <a href=\"https:\/\/learn.microsoft.com\/vcpkg\/examples\/asset-caching-source-nuget\">How to create a x-script Asset Caching source for NuGet | Microsoft Learn<\/a>) to use our own Azure DevOps NuGet feed as a source to upload &amp; restore packages. This addressed our issue with the air-gapped environment and allowed us to reuse existing cached packages, making the process more efficient.<\/p>\n<h1>Q: What is your overall impression of vcpkg?<\/h1>\n<p><strong>Shrey:<\/strong> Overall, the feedback has been good so far. vcpkg does a great job of caching the built libraries, making the developers\u2019 workflow efficient. It has also been easily accepted by developers because of its ease of use (i.e. no extra steps or setup was required).<\/p>\n<h1>Learn More About vcpkg<\/h1>\n<p>If you want to learn more about vcpkg, check out <a href=\"https:\/\/vcpkg.io\/en\/\">our website at vcpkg.io<\/a> and read the <a href=\"https:\/\/learn.microsoft.com\/vcpkg\/get_started\/overview\">vcpkg overview<\/a> in our documentation.<\/p>\n<p>If you have a story you would like to share with us about your experiences with vcpkg, feel free to contact us at <a href=\"mailto:vcpkg@microsoft.com\">vcpkg@microsoft.com<\/a>. You can submit bug reports in our <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/issues\">GitHub issue tracker<\/a> or <a href=\"https:\/\/github.com\/microsoft\/vcpkg\/discussions\/new?category=ideas\">make feature requests<\/a> in our discussion forum.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>vcpkg is a free and open-source C\/C++ package manager maintained by Microsoft and the C++ community that runs on Windows, macOS, and Linux. Over the years we have heard from companies using vcpkg to manage dependencies at enterprise-scale. For this blog post, I spoke to Shrey Chauhan, a Senior DevOps Engineer with Siemens Healthineers. Siemens [&hellip;]<\/p>\n","protected":false},"author":1063,"featured_media":28096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,272],"tags":[271,273],"class_list":["post-34928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-vcpkg","tag-cpp","tag-vcpkg"],"acf":[],"blog_post_summary":"<p>vcpkg is a free and open-source C\/C++ package manager maintained by Microsoft and the C++ community that runs on Windows, macOS, and Linux. Over the years we have heard from companies using vcpkg to manage dependencies at enterprise-scale. For this blog post, I spoke to Shrey Chauhan, a Senior DevOps Engineer with Siemens Healthineers. Siemens [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/34928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/1063"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=34928"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/34928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/28096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=34928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=34928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=34928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}