Skip to content

NetFx.wixext .NET Core packages don't detect newer versions #6257

Closed
wixtoolset/wix
#261

Description

@rseanhall

If this issue is a feature request:

  • Describe the scenario and benefits that the feature supports.

The current detect condition only can tell if the target version of the .NET Core package is installed. It needs to skip installing the package if a newer patch release is installed.

  • Describe how you're accomplishing the feature today (if possible).

Not possible without privately implementing this feature request.

  • Describe what you'd like the new feature to do.

Create a Bundle extension that runs code to detect .NET Core versions. This was close but it would actually load part of the runtime.

Activity

  1. added this to the v4.0 milestone on Oct 15, 2020
  2. rseanhall commented on Dec 14, 2020

    @rseanhall
    ContributorAuthor

    Both 3.1.x and 5.0.x fail when trying to install older version.

    The SDK bundle installs a version of the runtime without installing the runtime bundle, so bundle checks won't work.

    burn log
    [1894:06F0][2020-12-14T11:32:57]i001: Burn v3.14.0.4118, Windows v10.0 (Build 19041: Service Pack 0), path: C:\Windows\Temp\{AB945F00-C3E5-4F31-875C-309D3B72F480}\.cr\dotnet-runtime-5.0.0-win-x86.exe
    [1894:06F0][2020-12-14T11:32:57]i000: Initializing string variable 'DOTNETHOME' to value '[ProgramFilesFolder]dotnet'
    [1894:06F0][2020-12-14T11:32:57]i000: Initializing string variable 'BUNDLEMONIKER' to value 'Microsoft .NET Runtime - 5.0.0 (x86)'
    [1894:06F0][2020-12-14T11:32:57]i000: Initializing string variable 'PRODUCT_NAME' to value 'Microsoft .NET Runtime - 5.0.0 (x86)'
    [1894:06F0][2020-12-14T11:32:57]i000: Initializing string variable 'LINK_PREREQ_PAGE' to value 'https://go.microsoft.com/fwlink/?linkid=846817'
    [1894:06F0][2020-12-14T11:32:57]i009: Command Line: '-burn.clean.room=C:\Users\admin\Downloads\dotnet-runtime-5.0.0-win-x86.exe -burn.filehandle.attached=520 -burn.filehandle.self=528 /install /silent'
    [1894:06F0][2020-12-14T11:32:57]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\admin\Downloads\dotnet-runtime-5.0.0-win-x86.exe'
    [1894:06F0][2020-12-14T11:32:57]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\admin\Downloads\'
    [1894:06F0][2020-12-14T11:32:57]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\admin\AppData\Local\Temp\Microsoft_.NET_Runtime_-_5.0.0_(x86)_20201214113257.log'
    [1894:06F0][2020-12-14T11:32:57]i000: Setting string variable 'WixBundleName' to value 'Microsoft .NET Runtime - 5.0.0 (x86)'
    [1894:06F0][2020-12-14T11:32:57]i000: Setting string variable 'WixBundleManufacturer' to value 'Microsoft Corporation'
    [1894:14AC][2020-12-14T11:32:57]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
    [1894:14AC][2020-12-14T11:32:58]i000: Setting version variable 'WixBundleFileVersion' to value '5.0.0.29419'
    [1894:06F0][2020-12-14T11:32:58]i100: Detect begin, 3 packages
    [1894:06F0][2020-12-14T11:32:58]i102: Detected related bundle: {c2bde360-19b8-4048-8451-7ad96557c349}, type: Upgrade, scope: PerMachine, version: 5.0.1.29525, operation: Downgrade
    [1894:06F0][2020-12-14T11:32:58]i101: Detected package: dotnet_runtime_5.0.0_win_x86.msi, state: Absent, cached: None
    [1894:06F0][2020-12-14T11:32:58]i101: Detected package: dotnet_hostfxr_5.0.0_win_x86.msi, state: Absent, cached: None
    [1894:06F0][2020-12-14T11:32:58]i101: Detected package: dotnet_host_5.0.0_win_x86.msi, state: Absent, cached: None
    [1894:06F0][2020-12-14T11:32:58]i052: Condition '((VersionNT > v6.1) OR (VersionNT = v6.1 AND ServicePackLevel >= 1))' evaluates to true.
    [1894:06F0][2020-12-14T11:32:58]i199: Detect complete, result: 0x0
    [1894:14AC][2020-12-14T11:32:58]e000: Error 0x80070666: Cannot install a product when a newer version is installed.
    [1894:06F0][2020-12-14T11:32:58]i500: Shutting down, exit code: 0x666
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: BUNDLEMONIKER = Microsoft .NET Runtime - 5.0.0 (x86)
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: DOTNETHOME = C:\Program Files (x86)\dotnet
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: LINK_PREREQ_PAGE = https://go.microsoft.com/fwlink/?linkid=846817
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: PRODUCT_NAME = Microsoft .NET Runtime - 5.0.0 (x86)
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: ProgramFilesFolder = C:\Program Files (x86)\
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: VersionNT = 10.0.0.0
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleAction = 5
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleElevated = 1
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleFileVersion = 5.0.0.29419
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleInstalled = 0
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleLog = C:\Users\admin\AppData\Local\Temp\Microsoft_.NET_Runtime_-_5.0.0_(x86)_20201214113257.log
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleManufacturer = Microsoft Corporation
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleName = Microsoft .NET Runtime - 5.0.0 (x86)
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleOriginalSource = C:\Users\admin\Downloads\dotnet-runtime-5.0.0-win-x86.exe
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleOriginalSourceFolder = C:\Users\admin\Downloads\
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleProviderKey = {4bb23c45-8c5a-4191-ba82-4827034a0dec}
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleSourceProcessFolder = C:\Users\admin\Downloads\
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleSourceProcessPath = C:\Users\admin\Downloads\dotnet-runtime-5.0.0-win-x86.exe
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleTag = 
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleUILevel = 2
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixBundleVersion = 5.0.0.29419
    [1894:06F0][2020-12-14T11:32:58]i410: Variable: WixStdBALanguageId = 1033
    [1894:06F0][2020-12-14T11:32:58]i007: Exit code: 0x666, restarting: No
    
  3. barnson commented on Dec 14, 2020

    @barnson
    Member

    Really wish they'd used WixStandardBootstrapperApplication/@SuppressDowngradeFailure, something I added to avoid this kind of user hostility. Probably not something they'd consider for v3 servicing.

  4. rseanhall commented on Dec 16, 2020

    @rseanhall
    ContributorAuthor
  5. rseanhall commented on May 3, 2021

    @rseanhall
    ContributorAuthor

    x64 emulation on Windows Arm64 is adding another layer of complexity to this: dotnet/sdk#16896 and dotnet/designs#214.

  6. barnson commented on Feb 27, 2022

    @barnson
    Member

    With the current behavior, we should consider dropping .NET (non-Framework) redist package groups and just documenting what's needed and what's problematic.

  7. tjmoore commented on Jul 7, 2022

    @tjmoore

    Problem with bundling redist packages is likely they will be out of date already vs the latest .NET patch.

    I've raised this with dotnet project before that there's no direct link to the latest patch version to download and install. There are fixed links with long IDs to specific versions, and a link to the download page to let the user decide. Problem is there are a lot of options for the user to choose from and from experience already users do not read the instructions given, even in big bold letters and a picture with an arrow of what they need to click on. They immediately go and install what they think they need, so will end up installing the SDK (okay can get away with that) or the Desktop runtime instead of ASP.NET runtime, or specifically advise the Hosting Bundle for IIS support, and easy to miss.

    One thing that did come from discussions was updating .NET Core, and there was a decision finally to add .NET 5 & 6 into Windows Update, but I'm not sure that's occurred yet. I don't see updates there but then I've got SDKs installed.

    Problem also with .NET Core is it can be installed in many ways. It could even be without the installer but placed on the path, so no registry entry.

  8. jnm2 commented on Jul 7, 2022

    @jnm2

    I've raised this with dotnet project before that there's no direct link to the latest patch version to download and install.

    There are; URLs exist such as https://aka.ms/dotnet/6.0/windowsdesktop-runtime-win-x64.exe. See dotnet/installer#11040.

  9. tjmoore commented on Jul 8, 2022

    @tjmoore

    I've raised this with dotnet project before that there's no direct link to the latest patch version to download and install.

    There are; URLs exist such as https://aka.ms/dotnet/6.0/windowsdesktop-runtime-win-x64.exe. See dotnet/installer#11040.

    Thanks. I was completely unaware of this. I'm not sure if there's a link to the ASP.NET Runtime Hosting Bundle. There's no documentation on this it seems?

  10. jnm2 commented on Jul 8, 2022

    @jnm2

    @tjmoore My first guess worked: https://aka.ms/dotnet/6.0/aspnetcore-runtime-win-x64.exe
    Based on diffing the final URLs for the desktop runtime download and the ASP.NET Core runtime download.

  11. self-assigned this
    on Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions