guitarrapc / GraniResource

PowerShell Desired State Configuration Resources for real production workload.
https://www.powershellgallery.com/packages/GraniResource
MIT License
43 stars 8 forks source link

GraniResource recognized as Module Version 0.0 with PowerShell 4.0 #51

Closed guitarrapc closed 8 years ago

guitarrapc commented 8 years ago

This is because PowerShell 4.0 doesn't have DscResourceToExport key in .psd1.

As these are not supported in PowerShell 4.0 and this section cause Module Version in mof to be force "0.0"

Due to PowerShell 5.0 have this parameter while PowerShell 4.0 don't, this is breaking change for PowerShell DSC.

With GraniResource, this DSC Module supports from PowerShell 4.0, so will remove DscResourceToExport key from psd1

guitarrapc commented 8 years ago

Support in ver.3.7.5

guitarrapc commented 8 years ago

It's sound very strange for me to see PowerShell 5.0 show this message on Publish-Module.

WARNING: This module 'GraniResource.psd1' has
exported DscResources. As a best practice, include exported DSC resources in the module manifest file(.psd1). If your
PowerShell version is higher than 5.0, run Update-ModuleManifest -DscResourcesToExport to update the manifest with
ExportedDscResources field.