Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Nuget Spec Generated by AppVeyor invalid for PS Module Repository #318

Open
djwork opened this issue Apr 8, 2019 · 1 comment
Open

Nuget Spec Generated by AppVeyor invalid for PS Module Repository #318

djwork opened this issue Apr 8, 2019 · 1 comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@djwork
Copy link

djwork commented Apr 8, 2019

Details of the problem, bug, or enhancement

As part developing the fix issue ComputerManagementDsc #130 I have been running the appveyor build/unit test for my fork. When appveyor runs it generates a sample nuget file. I loaded the file into an internal repository where I store development modules and then tried to install the module via the PackageManagement cmdlets.

But PackageManagement did not recognize the nuget file as a valid PS Module, when comparing the my nuget package with the latest release ComputerManagementDsc.6.2.0.0.nupkg from PS Gallery I notice the where a lot of differences, specifically:

  • from my nuget: DesiredStateConfiguration DSC DSCResourceKit
  • from the release nuget: DesiredStateConfiguration DSC DSCResourceKit DSCResource PSModule PSIncludes_DscResource PSDscResource_Computer PSDscResource_OfflineDomainJoin PSDscResource_PowerPlan PSDscResource_PowerShellExecutionPolicy PSDscResource_ScheduledTask PSDscResource_TimeZone PSDscResource_VirtualMemory PSDscResource_WindowsEventLog

When I manually synced the tags from the release nuget spec into my nuget spec, PackageManagement recognized the nuget file as a valid PS Module and installed it.

When I asked about this over in ComputerManagementDsc #213, @PlagueHO said this issue belonged over on this repository and the problem\solution was probably in AppVeyor.psm1

Verbose logs showing the problem (if applicable)

Suggested solution to the issue

The nuget tags appear to be hard coded in AppVeyor\Invoke-AppveyorAfterTestTask line 1105:

$nuspecParams = @{
      packageName        = $ResourceModuleName
      destinationPath    = $MainModulePath
      version            = $env:APPVEYOR_BUILD_VERSION
      author             = $Author
      owners             = $Owners
      licenseUrl         = "https://github.com/PowerShell/DscResources/blob/master/LICENSE"
      projectUrl         = "https://github.com/$($env:APPVEYOR_REPO_NAME)"
      packageDescription = $ResourceModuleName
      tags               = "DesiredStateConfiguration DSC DSCResourceKit"
  }
  New-Nuspec @nuspecParams

Suggestions:

  1. Append 'DSCResource', 'PSModule' to the tags, from my testing this should be enough to make PackageManagement happy.
  2. Set or append the tags from the resource module's psd1 file (eg ComputerManagementDsc.psd1 PrivateData\PSData\Tags)
@PlagueHO PlagueHO added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Apr 30, 2019
@PlagueHO
Copy link
Contributor

Thanks @djwork - I'm freed up and will have some time to look into this over the weekend.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants