I have an existing module with all my custom DSC resources (v4) defined in the DSCResources folder.
I want to write my next one as a v5 class-based dsc resource but include it in my existing module of v4 resources.
I have the class defined in the file xMyResource.ps1 under DSCResources folder. In the module psm1 file I inline execute (. $PSScriptRoot\DSCResources\xMyResource.ps1) and in the module psd1 file I have DscResourcesToExport = 'xMyResource'. I also updated the PowerShellVersion to 5.0 in the definition.
Using Get-DscResource -Name xMyResource or -Module xMyModule doesn't show it. What am I missing?
My understanding based on the TechNet article (https://technet.microsoft.com/en-us/library/dn948461.aspx) is that I can have a module definition that exports one or more DSC resources. The module name doesn't have to match the folder name nor does the resource name have to match the module name.
Also, can I use a wildcard (*) like the FunctionsToExport property or must I include each DscResourcesToExport definition?