是否安装了.NET版本的.NET资源?

问题描述 投票:3回答:2

处理某些DSC配置和我正在安装的某些应用程序需要安装特定版本的.NET作为先决条件。我想知道系统上是否安装了.NET Resource for .NET版本?

.net powershell dsc
2个回答
2
投票

不,但是有一个通用的应用程序资源,可用于安装任何msi(和\或测试,如果它已安装)。

您还可以使用cchoco dsc模块使用chocolatey来安装特定的.NET框架版本:

    cChocoInstaller installChoco {
        InstallDir = "c:\choco"
    }
    cChocoPackageInstallerSet installSomeStuff {
        Ensure    = 'Present'
        Name      = @( "dotnet4.6.2" )
        DependsOn = "[cChocoInstaller]installChoco"
    }

1
投票

做一些搜索我发现有人确实这样做了。不是100%到我想要的地方,但大部分繁重的工作已经完成。不错的工作,它是使用PowerShell v4.0方法编写的。

https://github.com/guitarrapc/GraniResource/tree/master/DSCResources/Grani_DotNetFramework

还有一个资源可以通过http:https://github.com/guitarrapc/GraniResource/tree/master/DSCResources/Grani_Download下载

© www.soinside.com 2019 - 2024. All rights reserved.