{"id":1052,"date":"2017-04-09T17:56:34","date_gmt":"2017-04-09T17:56:34","guid":{"rendered":"http:\/\/tpodolak.com\/blog\/?p=1052"},"modified":"2017-04-09T17:56:34","modified_gmt":"2017-04-09T17:56:34","slug":"downgrading-visual-studio-code-extension","status":"publish","type":"post","link":"https:\/\/tpodolak.com\/blog\/2017\/04\/09\/downgrading-visual-studio-code-extension\/","title":{"rendered":"Downgrading Visual Studio Code extension"},"content":{"rendered":"<h3>1. Introduction<\/h3>\n<p>For time to time when you update Visual Studio Code&#8217;s extension you realize that there were some breaking changes you don\u2019t like or the extension has a bug which prevents you from using it. Usually, in this kind of situations, you would like to just go back to the version you were using previously rather than stop using the extension at all. Unfortunately, <i>VSCode<\/i> doesn\u2019t give us an option to install a specific version of the extension for <a href=\"https:\/\/github.com\/Microsoft\/vscode\/issues\/12764\">now<\/a>. Luckily there is an easy way of doing that manually. <\/p>\n<h3>2. Installation<\/h3>\n<p>Let&#8217;s assume that I would like to downgrade <i>C#<\/i> plugin from newest version (<i>1.8.1<\/i> at the moment) to <i>1.7.0<\/i>. First of all, we have to uninstall current extension. As there as some issues of doing that via command line, just do it from <i>VSCode<\/i> by clicking on uninstall button in extension screen.<br \/>\n<a href=\"\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/Initial.png\" rel=\"attachment wp-att-1054\"><img decoding=\"async\" src=\"\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/Initial.png\" alt=\"Initial\" width=\"746\" class=\"aligncenter size-full wp-image-1054\" srcset=\"https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/Initial.png 746w, https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/Initial-150x119.png 150w, https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/Initial-300x238.png 300w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/a><br \/>\nIn the next step we have to download proper extension&#8217;s version using <i>vsassets<\/i> <i>api<\/i>. The url pattern looks as follows<\/p>\n<pre lang=\"bash\">\r\nhttps:\/\/${publisher}.gallery.vsassets.io\/_apis\/public\/gallery\/publisher\/${publisher}\/extension\/${extension_name}\/${version}\/assetbyname\/Microsoft.VisualStudio.Services.VSIXPackage\r\n<\/pre>\n<p>In my case, the variables looks as follow<\/p>\n<ul>\n<li><i>${publisher}<\/i> &#8211; ms-vscode<\/li>\n<li><i>${extension_name}<\/i> &#8211; csharp<\/li>\n<li><i>${version}<\/i> &#8211; 1.7.0<\/li>\n<\/ul>\n<p>and entire url can be rewritten as<\/p>\n<pre lang=\"bash\">\r\nhttps:\/\/ms-vscode.gallery.vsassets.io\/_apis\/public\/gallery\/publisher\/ms-vscode\/extension\/csharp\/1.7.0\/assetbyname\/Microsoft.VisualStudio.Services.VSIXPackage\r\n<\/pre>\n<p>Having the link prepared we can paste it into browser address bar and download the extension. Once the file is downloaded, run <i>VSCode<\/i>, hit <i>CTRL+SHIFT+P<\/i>, type <i>vsix<\/i> in command line and choose<\/p>\n<pre lang=\"bash\">\r\nExtensions: Install from VSIX...\r\n<\/pre>\n<p><a href=\"\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/vsix.png\" rel=\"attachment wp-att-1055\"><img decoding=\"async\" src=\"\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/vsix.png\" alt=\"vsix\" width=\"877\" class=\"aligncenter size-full wp-image-1055\" srcset=\"https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/vsix.png 877w, https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/vsix-150x43.png 150w, https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/vsix-300x86.png 300w\" sizes=\"(max-width: 877px) 100vw, 877px\" \/><\/a><br \/>\nSelect the file you&#8217;ve just downloaded and restart editor after installation. From now on you can use older version of your favorite extension.<br \/>\n<a href=\"\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/after.png\" rel=\"attachment wp-att-1053\"><img decoding=\"async\" src=\"\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/after.png\" alt=\"after\" width=\"432\" class=\"aligncenter size-full wp-image-1053\" srcset=\"https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/after.png 432w, https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/after-132x150.png 132w, https:\/\/tpodolak.com\/blog\/wp-content\/uploads\/2017\/04\/downgrading-visual-studio-code-extension\/after-263x300.png 263w\" sizes=\"(max-width: 432px) 100vw, 432px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction For time to time when you update Visual Studio Code&#8217;s extension you realize that there were some breaking changes you don\u2019t like or the extension has a bug which prevents you from using it. Usually, in this kind of situations, you would like to just go back to the version you were using [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[321],"tags":[322],"class_list":["post-1052","post","type-post","status-publish","format-standard","hentry","category-vscode","tag-vscode"],"_links":{"self":[{"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/posts\/1052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/comments?post=1052"}],"version-history":[{"count":17,"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/posts\/1052\/revisions"}],"predecessor-version":[{"id":1072,"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/posts\/1052\/revisions\/1072"}],"wp:attachment":[{"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/media?parent=1052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/categories?post=1052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tpodolak.com\/blog\/wp-json\/wp\/v2\/tags?post=1052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}