{"id":18265,"date":"2018-01-16T09:47:55","date_gmt":"2018-01-16T17:47:55","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=18265"},"modified":"2019-02-18T17:48:04","modified_gmt":"2019-02-18T17:48:04","slug":"vcpkg-introducing-the-upgrade-command","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/vcpkg-introducing-the-upgrade-command\/","title":{"rendered":"Vcpkg: Introducing the upgrade command"},"content":{"rendered":"<p><i>If you\u2019re just getting started and want to learn more about vcpkg, check out our <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/vcpkg-a-tool-to-acquire-and-build-c-open-source-libraries-on-windows\/\">initial post<\/a>.<\/i><\/p>\n<p>We recently added a new option to vcpkg (i.e. vcpkg contact &#8211;survey) to provide a direct way to share your feedback with the Vcpkg team. A big thank you to those of you that shared your thoughts and suggestions with the team through this new channel.<\/p>\n<p>The new upgrade command we\u2019re introducing today is a result of your direct feedback. This new command will perform all the necessary tasks: removing old version, purging outdated libraries, and then automatically installing the newest version of each library, including its dependencies.<\/p>\n<h4>The \u201cupgrade\u201d command should now be used to upgrade the installed libraries<\/h4>\n<p>Used without arguments, the upgrade command will upgrade all the outdated libraries at once.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/clip_image00216.jpg\"><img decoding=\"async\" width=\"571\" height=\"186\" title=\"clip_image002\" style=\"border: 0px currentcolor\" alt=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/clip_image002_thumb14.jpg\" border=\"0\" \/><\/a><\/p>\n<p>By default, the upgrade command only lists the libraries to be upgraded, but doesn\u2019t upgrade them. To effectively upgrade them, you should use the &#8211;no-dry-run option.<\/p>\n<p>The Upgrade command can also be used with one or multiple arguments (the libraries to upgrade if not all of them) and a few other options:<\/p>\n<pre class=\"code decode:true\"><span style=\"background: white;color: blue\"> vcpkg upgrade --no-dry-run <\/span><\/pre>\n<p>Options:<\/p>\n<ul>\n<li>&#8211;no-dry-run Actually upgrade<\/li>\n<li>&#8211;keep-going Continue installing packages on failure<\/li>\n<li>&#8211;triplet &lt;t&gt; Set the default triplet for unqualified packages<\/li>\n<li><a>\u00a0<\/a>&#8211;vcpkg-root &lt;path&gt; Specify the vcpkg directory to use instead of current directory or tool directory<\/li>\n<\/ul>\n<p>For example, specifying only two libraries to upgrade:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/clip_image00410.jpg\"><img decoding=\"async\" width=\"564\" height=\"134\" title=\"clip_image004\" style=\"border: 0px currentcolor\" alt=\"clip_image004\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/clip_image004_thumb9.jpg\" border=\"0\" \/><\/a><\/p>\n<h4>Upgrade vs Update<\/h4>\n<p>In the latest Vcpkg version, the update command displays the list of outdated libraries and invites the user to use the new upgrade command.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/clip_image00610.jpg\"><img decoding=\"async\" width=\"562\" height=\"234\" title=\"clip_image006\" style=\"border: 0px currentcolor\" alt=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/clip_image006_thumb10.jpg\" border=\"0\" \/><\/a><\/p>\n<p>We identified this area of improvement because of your feedback! Thanks continuing to provide your insights and suggestions for improvements. Complete the survey running vcpkg contact &#8211;survey , open an issue on <a href=\"https:\/\/github.com\/Microsoft\/vcpkg\/\">GitHub<\/a> or send us an email at <a>vcpkg@microsoft.com<\/a>.GitHub or send us an email at <a>vcpkg@microsoft.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re just getting started and want to learn more about vcpkg, check out our initial post. We recently added a new option to vcpkg (i.e. vcpkg contact &#8211;survey) to provide a direct way to share your feedback with the Vcpkg team. A big thank you to those of you that shared your thoughts and [&hellip;]<\/p>\n","protected":false},"author":316,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[230,272],"tags":[271,190,51,273],"class_list":["post-18265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-new-feature","category-vcpkg","tag-cpp","tag-libraries","tag-upgrade","tag-vcpkg"],"acf":[],"blog_post_summary":"<p>If you\u2019re just getting started and want to learn more about vcpkg, check out our initial post. We recently added a new option to vcpkg (i.e. vcpkg contact &#8211;survey) to provide a direct way to share your feedback with the Vcpkg team. A big thank you to those of you that shared your thoughts and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/18265","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\/316"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=18265"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/18265\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=18265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=18265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=18265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}