Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualstudio2017: support upgrade scenarios #10

Closed
jberezanski opened this issue Apr 19, 2017 · 1 comment
Closed

visualstudio2017: support upgrade scenarios #10

jberezanski opened this issue Apr 19, 2017 · 1 comment

Comments

@jberezanski
Copy link
Owner

Use the VS Installer upgrade command.

jberezanski added a commit that referenced this issue May 15, 2018
…ation to update a VS product instance

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
…n) updating of VS 2017 products

Very naive/work in progress for now.

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
… to reflect latest product version

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
… use detected instance info for installer update

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
…channel manifest

- refactor to facilitate reuse
- support obtaining the file from layout

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
…rrect Installer version detection logic

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
…determination logic

Logic extrapolated from Microsoft.VisualStudio.Setup.dll/Microsoft.VisualStudio.Setup.ChannelManager.EnsureEngineCanReadManifests().

EngineVersion := FileVersion of <VS Installer>\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\Microsoft.VisualStudio.Setup.dll
EngineVersion is in catalog manifest ($manifest.engineVersion)

installer version :=
    resources\app\main\Main.js:
    var EXE_VERSION = require("../package.json").version;

    function createSetupEngineAdapter:
        // exeVersionForEngine is used to detect updates. During development,
        // checking for updates is undesired. Typically, a true release version
        // looks like "x.y.build.qfe", otherwise the version is "x.y.z".
        // Passing null for version skips checking for updates.
        var exeVersionParts = EXE_VERSION.split(".");
        var exeVersionForEngine = exeVersionParts.length > 3 ? EXE_VERSION : null;
(this gets passed to Microsoft.VisualStudio.Setup.Service.dll/Microsoft.VisualStudio.Setup.ProductsProviderService.Initialize()
and from that through ((Service)base).Initialize() -> Service.InitializeSharedFields() to ChannelManagerFactory and ChannelManager)
so: <VS Installer>\resources\app\package.json -> version
NOT <VS Installer>\vs_installer.version.json -> version!
installer version is in channel manifest ($bootstrapper.version)

ChannelManager.EnsureEngineCanReadManifests() compares engine versions and installer versions; both comparisons must be satisfied (greater or equal)

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
…lled product

When determining the channel uri using data obtained from an installed
product instance, InstallChannelUri should take precedence over ChannelUri.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
…g product update

ChannelUri should be used for updates. InstallChannelUri can be used for
adding components/workloads.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
- if download fails after the local file is created (on the hash check,
  for example), remove the downloaded file
- give the local files a bit more descriptive names for easier
  troubleshooting

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
…uring download, if known"

The checksum and size of the component manifest in the channel manifest
seem totally bogus.

This reverts commit f8de214.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
…ot updated

The VS Installer will happily return exit code 0 despite logging an
error in its log in at least one update scenario (when an update is not
detected due to channel cache update failure).

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
… auto add --layoutPath

That way, the product packages will always recognize a consistent set of
package parameters (bootstrapperPath, installLayoutPath) regardless of
whether a new install or an update is being performed.

To consider: should an update with a bootstrapper path/uri known,
perhaps, invoke the bootstrapper, not the VS Installer?

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
…peration package parameter handling

Move negated argument handling later, so that the original, user-supplied
parameters are accesible longer.

Explain why and when it would be beneficial to use the bootstrapper
instead of the installer.

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
…e from layout path only if --noWeb was requested

If --noWeb is not specified, the VS installer/bootstrapper will still
look to the online manifests even if invoked from layout. The extension
needs to do that, too.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
…ller update only if --noWeb was requested

Without --noWeb, the VS Installer will use ChannelUri, so the extension
needs to to that, too.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
…tion did not actually update the product to the expected version

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
…VS products

That way, users can expect that packages using Install-VisualStudio will always
call the bootstrapper and workload packages will always call the installer,
so the users will know which arguments will be supported in each case.

GitHub-Issue: GH-10
jberezanski added a commit that referenced this issue May 15, 2018
This may be useful when instaling a fresh instance of a VS product using
a bootstrapper which installs a specific version of the product
(e.g. the 15.0 bootstrappers available from MSDN).

Note that because the 15.0 bootstrapper does not support
--noUpdateInstaller, the package must be instructed not to pass this
parameter to the bootstrapper, by additionally specifying
--no-noUpdateInstaller.

GitHub-Issue: GH-7 GH-8 GH-10 GH-26
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
jberezanski added a commit that referenced this issue May 15, 2018
@jberezanski
Copy link
Owner Author

This has been implemented for almost a year now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant