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

nuspec - Add .NET Framework 4.x Dependency [Customer] #632

Closed
FranklinYu opened this issue Dec 13, 2018 · 7 comments
Closed

nuspec - Add .NET Framework 4.x Dependency [Customer] #632

FranklinYu opened this issue Dec 13, 2018 · 7 comments
Labels
Bug Issues where something has happened which was not expected or intended
Milestone

Comments

@FranklinYu
Copy link

The description says

This package will only work correctly on Windows 7 SP1 through Windows 10 (1708) or Windows Server 2008 R2 SP1 through Windows Server 2016, and requires .NET Framework 4.5.2 at minimum.

I hereby propose to add DotNet4.5.2 to dependency list. #40 is related, but that is about .NET 4.0.

Moved from Disqus comment.

@ferventcoder ferventcoder added Bug Issues where something has happened which was not expected or intended Customer Bug reported or feature requested by a licensed customer of Chocolatey labels Apr 15, 2019
@ferventcoder ferventcoder added this to the 0.17.0 milestone Apr 15, 2019
@ferventcoder ferventcoder changed the title .NET Framework 4.5.2 Dependency nuspec - Add .NET Framework 4.5.2 Dependency Apr 15, 2019
@ferventcoder ferventcoder changed the title nuspec - Add .NET Framework 4.5.2 Dependency nuspec - Add .NET Framework 4.x Dependency Apr 15, 2019
@ferventcoder
Copy link
Member

ferventcoder commented Apr 15, 2019

I'm proposing https://chocolatey.org/packages/dotnetfx/4.5.2.0 instead.

<dependency id="dotnetfx" version="4.5.2.0" />

Take a minimum version dependency on .NET Framework package that @jberezanski has set up.

@ferventcoder
Copy link
Member

ferventcoder commented Apr 15, 2019

The only thing I don't like here is that if someone does NOT want to upgrade to a newer .NET framework dependency, this will do so. Perhaps a second set of packages that are specific to ensuring a minimum version or doing nothing.

@ferventcoder
Copy link
Member

@jberezanski This goes back to why I said a single .NET Framework package needs more discussion. I want to specify a minimum version dependency and NOOP if it is met. That is not possible with what has been done with the dotnetfx package because by design <dependency id="dotnetfx" version="4.5.2.0" /> means at least this version, but install the latest one available as long as there are no other constraints. So today if I ran this, it would install 4.7.2.20180712. I may not want to go that high on .NET Framework due to other constraints.

However, it's not as simple as saying I can specify an exact version dependency on the dotnetfx package either. I potentially block other valid and compatible installations If I add it like this: version="[4.5.2.0]" (exact version):

  • If we already installed something else that had a higher minimum, it would fail this install
  • If we try to install something else after this took a higher minimum, it would fail that installation

Really the best route is to mix what you have done with

$release = 379893
$version = '4.5.2'
$productNameWithVersion = "Microsoft .NET Framework $version"
$url = 'https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe'
$checksum = '6C2C589132E830A185C5F40F82042BEE3022E721A216680BD9B3995BA86F3781'
$checksumType = 'sha256'
 
if (Test-Installed -Release $release) {
    Write-Host "$productNameWithVersion or later is already installed."
    return
}

Into several packages that are a bit more official. And add a package parameter that would allow someone to force that particular version to be installed, even if there is a newer version. That way you get the best of both worlds.

Thoughts?

@ferventcoder
Copy link
Member

I should say the constraints are felt most often by organizations and not necessarily individuals. We have both types of users on the community repo.

@ferventcoder
Copy link
Member

I should note for other folks who find there way here, I did not raise an issue at https://github.com/jberezanski/ChocolateyPackages/issues because by design there isn't any change to the dotnetfx package I can suggest at the moment. It's a partial solution - it meets the case where folks are fine with getting the latest .NET version when they install something.

@gep13
Copy link
Member

gep13 commented Apr 18, 2019

@FranklinYu I have added the suggested dependency. This currently fails installation during package installation on the local test environment do to dependency requiring a reboot, so an exemption will be required for moderation process.

This may require some changes based on some potential work/changes to dotnet packages on chocolatey.org, but that can be revisited at a later date.

@gep13 gep13 closed this as completed Apr 18, 2019
@gep13 gep13 changed the title nuspec - Add .NET Framework 4.x Dependency nuspec - Add .NET Framework 4.x Dependency [Customer] Mar 26, 2020
@gep13 gep13 removed the Customer Bug reported or feature requested by a licensed customer of Chocolatey label Mar 26, 2020
@choco-bot
Copy link

🎉 This issue has been resolved in version 0.17.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

No branches or pull requests

4 participants