{"id":16484880,"url":"https://github.com/laurentdardenne/nuspec","last_synced_at":"2026-04-27T18:03:35.846Z","repository":{"id":174168722,"uuid":"68008710","full_name":"LaurentDardenne/Nuspec","owner":"LaurentDardenne","description":"Powershell DSL to create a nuspec file.","archived":false,"fork":false,"pushed_at":"2023-08-29T08:49:17.000Z","size":44,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-10T12:50:31.740Z","etag":null,"topics":["dsl","nuget","nuspec","powershell","powershell-dsl"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LaurentDardenne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-09-12T12:54:12.000Z","updated_at":"2025-10-06T09:19:48.000Z","dependencies_parsed_at":"2024-02-07T17:08:14.711Z","dependency_job_id":"c93021d1-2105-489b-96d8-a5a89f76e6b3","html_url":"https://github.com/LaurentDardenne/Nuspec","commit_stats":null,"previous_names":["laurentdardenne/nuspec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LaurentDardenne/Nuspec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FNuspec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FNuspec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FNuspec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FNuspec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaurentDardenne","download_url":"https://codeload.github.com/LaurentDardenne/Nuspec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FNuspec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsl","nuget","nuspec","powershell","powershell-dsl"],"created_at":"2024-10-11T13:18:37.023Z","updated_at":"2026-04-27T18:03:35.827Z","avatar_url":"https://github.com/LaurentDardenne.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Nuspec\nPowershell DSL to create a nuspec file.\nOnly the following features are implemented : Files, Dependencies\n\nTo install this module :\n```Powershell\n$PSGalleryPublishUri = 'https://www.myget.org/F/ottomatt/api/v2/package'\n$PSGallerySourceUri = 'https://www.myget.org/F/ottomatt/api/v2'\n\nRegister-PSRepository -Name OttoMatt -SourceLocation $PSGallerySourceUri -PublishLocation $PSGalleryPublishUri #-InstallationPolicy Trusted\nInstall-Module PSNuspec -Repository OttoMatt\n```\n\nTo avoid the character encoding problems with nuspec files ('_utilisÃ©s_' instead '_utilisés_'), the scripts must be encoded with UTF8 nobom.\n```Powershell\nnuspec 'MyModule' '1.0' {\n   properties @{\n        Authors=$Env:USERNAME\n        Description='test'\n        title=''\n        summary=''\n        #owners=''\n        copyright='Copyleft'\n\n         #default $false\n        requireLicenseAcceptance=$False\n        requireLicenseAcceptanceSpecified=$False\n\n         #default en-US'\n        language='en-US'\n\n        #PSData\n        licenseUrl='https://creativecommons.org/licenses/by-nc-sa/4.0/'\n        projectUrl='https://github.com/LaurentDardenne/'\n        iconUrl='https://github.com/LaurentDardenne/Nuspec/blob/master/Icon/Nuspec.png'\n        releaseNotes=''\n        tags=$null\n   }\n   files {\n      file -src 'C:\\temp\\Remove-Conditionnal.ps1'\n      file -src 'C:\\temp\\Replace-String.ps1'\n   }\n}|Save-Nuspec -FileName c:\\temp\\Test.nuspec\n```\nIt is possible to create nested nuspec :\n```Powershell\n$Nuspecs=Nuspec 'Module one' '1.0' {\n    properties @{\n       Description='test'\n       Authors=$Env:USERNAME\n    }\n\n    dependencies {\n       dependency 'Machin' '1.0'\n       dependency 'Truc' '2.0'\n\n       Nuspec 'Module two' '0.8' {\n           properties @{\n             Authors=$Env:USERNAME\n             Description='test'\n           }\n\n          dependencies {\n             dependency 'Bidule' '1.2'\n             dependency 'Pester' '3.9'\n          }\n      }\n    }\n}\n```\n$Nuspecs contains two objects :\n```Powershell\n$nuspecs[0].metadata\n```\n```\nid                                : Module two\nversion                           : 0.8\n...\ndependencies                      : {Bidule, Pester}\n```\nThe dependencies list of the first nupsec object contains the nested nuspec as a dependency : \n```Powershell\n$nuspecs[1].metadata\n```\n```\nid                                : Module one\nversion                           : 1.0\n...\ndependencies                      : {Machin, Truc, Module two}\n```\nThe 'Nuspec' bloc create an instance of _[NugetSchema.package]_, then the Save-Nuspec function create a XML file from the C# instance.\nSee the [XMLObject module](https://github.com/LaurentDardenne/XMLObject).\n\nTo push one or more packages :\n```Powershell\n$NuspecDelivery='C:\\temp'\n\n$Result=nuspec 'PSNuspec' 1.0.0 {\n            properties @{\n                Authors='Dardenne Laurent'\n                ...\n}\n\n$Result|\n Push-nupkg -Path $NuspecDelivery -Source 'https://www.myget.org/F/ottomatt/api/v2/package' -Apikey $Key\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentdardenne%2Fnuspec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurentdardenne%2Fnuspec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentdardenne%2Fnuspec/lists"}