How can I check for Visual Studio updates via the command line?

前端 未结 3 671
时光取名叫无心
时光取名叫无心 2021-02-14 11:55

In an attempt to streamline my Virtual Environment setup, I\'m using Chocolatey to automate my VM.

Since I can run the cinst command to install Visual Studi

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-14 12:07

    There is a way to check but it is not at all straight forward. Visual Studio Updates are published via an ATOM feed that is currently hosted here:

    http://go.microsoft.com/fwlink/?LinkID=251032

    This URL can be located in:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Platform\Shell\Microsoft.VisualStudio.ExtensionManager.Implementation.pkgdef

    Under the [$RootKey$\ExtensionManager\Repositories{52943709-1abb-4abe-b413-41e8bb6d0462}] key.

    The above URL should not change for any version of Visual studio BUT that is not a guarantee. If you examine the response of http://go.microsoft.com/fwlink/?LinkID=290886, you will currently get this response:

    
    
      
      uuid:99B94631-1B1A-45A0-9C34-54F75988DD54;id=1
      2013-02-12T20:00:00-07:00  
      
        8EAF6C8E-1283-4EEE-AB6E-F0F087BFCBFF
        Visual Studio 2012 Update 3
        Includes security updates, other critical updates, hotfixes, and feature packs that have been issued since the product was released.
        2012-12-01T21:00:00-07:00
        2012-12-01T21:00:00-07:00
        
          Microsoft Corp.
        
        
        
        
        
        
        
        
        
          8EAF6C8E-1283-4EEE-AB6E-F0F087BFCBFD
          11.0.60610.01
          
        
      
      
        28743233-1A36-4e67-8747-F072F8C76D1F
        Visual Studio Extensions for Windows Library for JavaScript
        This release updates the development resources for the controls, CSS styles, and helper functions that are included in the Windows Library for JavaScript.
        2013-08-08T20:00:00-07:00
        2013-08-08T20:00:00-07:00
        
          Microsoft Corp.
        
        
        
        
        
        
        
          Microsoft.WinJS
          1.0.9200.20789
          
        
      
    
    

    Note that there are two entries in this feed and the one you are interested in is the one with a title beginning with "Visual Studio 2012 Update."

    If the Version specified in this file (11.0.60610.01 here) is greater than the version you have on disk:

    (Get-Item "${env:ProgramFiles(x86)}\Microsoft Visual Studio 11.0\common7\ide\devenv.exe").VersionInfo.ProductVersion
    

    Then you would want to download and install the url in the Link/@Update node:

    
    

    That Url should redirect to an MSI that has the update.

提交回复
热议问题