criteo-cookbooks / ms_dotnet

Chef Cookbook to install Microsoft .NET
Apache License 2.0
17 stars 19 forks source link

Windows server 2016 - preinstalled .NET #66

Closed lbn-chef-team closed 7 years ago

lbn-chef-team commented 7 years ago

Hello,

As defined here: https://msdn.microsoft.com/en-us/library/8z6watww%28v=vs.110%29.aspx

.NET 4.6.1 and 4.6.2 is applicable only on windows 10 RTM.

For Windows 10 Anniversary and windows 2016, only .NET 4.7 is installable.

Don't know if it is the only change to do at: https://github.com/criteo-cookbooks/ms_dotnet/blob/master/libraries/v4_helper.rb

@package_setup ||= case nt_version
        # Windows XP & Windows Server 2003
        when 5.1, 5.2 then %w(4.0)
        # Windows Vista & Server 2008
        when 6.0 then %w(4.0 4.5 4.5.1 4.5.2 4.6)
        # Windows 7 & Server 2008R2
        when 6.1 then %w(4.0 4.5 4.5.1 4.5.2 4.6 4.6.1 4.6.2 4.7)
        # Windows 8 & Server 2012
        when 6.2 then %w(4.5.1 4.5.2 4.6 4.6.1 4.6.2 4.7)
        # Windows 8.1 & Server 2012R2
        when 6.3 then %w(4.5.2 4.6 4.6.1 4.6.2 4.7)
    # Windows 10 RTM
    when 10.0.10240 then %w(4.6.1 4.6.2 4.7)
    # Windows 10 November Update
    when 10.0.10586 then %w(4.6.2 4.7)
        # Windows 10 anniversary & Server 2016
        when 10.0.14393 then %w(4.7)
    # Windows 10 November Update
    when 10.0.15063 then []
    # Other versions
        else []
end

Hope it can help. Regards,

Annih commented 7 years ago

Hello @lbn-chef-team

I think I understand your problem, but could you provide the error message you got? To resolve this issue, your logic is right but because nt_version is a float it won't work.

I think we might have to use the full platform_version here or mix nt_version + platform_version.

Annih commented 7 years ago

Thanks for your precise feedback, it helped a lot for the implementation!