{"id":26157360,"url":"https://github.com/ksware/ksware.msbuildtargets","last_synced_at":"2025-03-11T09:59:25.638Z","repository":{"id":29578485,"uuid":"122102790","full_name":"KsWare/KsWare.MSBuildTargets","owner":"KsWare","description":"Executes commands on build.","archived":false,"fork":false,"pushed_at":"2023-06-19T22:57:19.000Z","size":143,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-09T17:49:57.936Z","etag":null,"topics":["auto-increment","increment","increment-ci","nuget","nuspec","packagebuilder"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KsWare.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-19T18:23:43.000Z","updated_at":"2022-07-29T02:53:35.000Z","dependencies_parsed_at":"2023-01-14T15:13:50.529Z","dependency_job_id":null,"html_url":"https://github.com/KsWare/KsWare.MSBuildTargets","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KsWare%2FKsWare.MSBuildTargets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KsWare%2FKsWare.MSBuildTargets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KsWare%2FKsWare.MSBuildTargets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KsWare%2FKsWare.MSBuildTargets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KsWare","download_url":"https://codeload.github.com/KsWare/KsWare.MSBuildTargets/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243012679,"owners_count":20221606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["auto-increment","increment","increment-ci","nuget","nuspec","packagebuilder"],"created_at":"2025-03-11T09:59:24.941Z","updated_at":"2025-03-11T09:59:25.613Z","avatar_url":"https://github.com/KsWare.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# KsWare.MSBuildTargets\n\n**This project is no longer under active development**  \nThe successor for SDk projects is [KsWare.BuildTools.IncrementVersion](https://github.com/SchreinerK/KsWare.BuildTools.IncrementVersion)\n\u003chr/\u003e\n\nExecutes commands on build. \n\nWith this package it is easy to build and create/publish the nuget package with auto increment version support.\n\nYou can configure your Debug build to create a pre-release package with an auto incremented \"-CI#####\" suffix \nand your Release build with an auto incremented patch number.\n\n##### Version 0.x.x\n - **For test purposes only. No warranty.**\n - Call NuGet commands\n - Different build configurations\n - Hierarchical configuration (define nuget APIKey outside of project)\n - NuGet: auto increment patch version\n - NuGet: auto increment CI version [e.g. 1.0.0-CI00001]\n - NuGet: supports install.ps1/uninstall.ps1 (also in VS 2017)\n\n[![Build status](https://ci.appveyor.com/api/projects/status/rn94sivofrvc3uvf/branch/master?svg=true)](https://ci.appveyor.com/project/SchreinerK/ksware-msbuildtargets/branch/master)\n[![NuGet Badge](https://buildstats.info/nuget/KsWare.MSBuildTargets)](https://www.nuget.org/packages/KsWare.MSBuildTargets/)\n\n##### *upcomming* Version 1.0.x\n - Public. \n - Uses Semantic Versioning 2.0.0\n - call other commands\n - delayed signing (define key.snk outside of project)\n\n## Usage\n\n- Add the [KsWare.MSBuildTargets](https://www.nuget.org/packages/KsWare.MSBuildTargets/) nuget package\n- optional edit your `project.nuspec`\n- create/edit `KsWare.MSBuildTargets.config`\n- build your project\n\n## Batch Usage\n\n```batch\nset ProjectPath=C:\\dev\\YourProject\\YourProject.csproj\nset TargetPath=C:\\dev\\YourProject\\bin\\release\\YourProject.dll\nKsWare.MSBuildTargets.exe -pp \"%ProjectPath%\" -cn Release -pn \"Any CPU\" -tp \"%TargetPath%\"\n```\n### Configuration File\n\nThe PackageBuilder.config contains the commands and properties.\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cConfiguration xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" FileVersion=\"1.0\"\u003e\n    \u003cBuildConfiguration\u003e\n    \u003cProperty Name=\"NuGet.Pack.OutputDirectory\" Value=\"D:\\Develop\\Packages\" /\u003e\n    \u003cProperty Name=\"NuGet.Push.ApiKey\" Value=\"your-nuget-api-key-\" /\u003e\n    \u003cProperty Name=\"SN.KeyFile\" Value=\"D:\\Develop\\Company.snk\" /\u003e\n    \u003c/BuildConfiguration\u003e\n    \u003cBuildConfiguration Configuration=\"Debug\"\u003e\n    \u003cCommand\u003enuget pack $IDE.ProjectPath$ -OutputDirectory $OutputDirectory$ -version $IncrementCI$\u003c/Command\u003e\n    \u003c/BuildConfiguration\u003e\n    \u003cBuildConfiguration Configuration=\"Release\"\u003e\n    \u003cCommand\u003esn -R $IDE.ProjectPath$ $SN.KeyFile$\u003c/Command\u003e\n    \u003cCommand\u003enuget pack $IDE.ProjectPath$ -OutputDirectory $OutputDirectory$ -version $IncrementPatch$\u003c/Command\u003e\n    \u003cCommand\u003enuget push $PackagePath$ -apikey $ApiKey$\u003c/Command\u003e\n    \u003c/BuildConfiguration\u003e\n\u003c/Configuration\u003e\n```\nThe configuration is hierarchical. That means you can define a config file with more common (or secret) properties (and commands) in a directory with higher level and project specific settings at project level.\n```\n\\Develop\\  \n  KsWare.MSBuildTargets.config (Master with ApiKey)\n  \\Project\\  \n    KsWare.MSBuildTargets.config (Project specific)\n```\nHierarchical property reading:  \n1. in the matching configuration\n2. in the empty configuration\n3. in parent configuration file in the matching configuration\n4. in parent configuration file in the empty configuration\n5. continue with step 3 until a property has been found\n\nHierarchical command reading: \n\nAs in property reading but commands read as complete block. That means, if a configuration contains commands, only this commands are used.\n\n### Command Line Parameter\n\n**Note:** Not yet implemented\n\nParameter are usually read from KsWare.MSBuildTargets.config and can also be overwritten by command line:\n\n\n - `-version Increment` will increment patch version\n - `-version IncrementCI` will increment CI version [e.g. 1.0.0-CI00001]\n - and all known NuGet.exe parameter\n\n## Known Issues and scheduled Features\n\n - support YAML/JSON configuration\n - DONE include a sample KsWare.MSBuildTargets.config\n - DONE include a template nuspec\n - DONE avoid use of Build Events\n - DONE avoid use of %PATH%, instead use tool directory\n\n## NuGet\n\n[KsWare.MSBuildTargets](https://www.nuget.org/packages/KsWare.MSBuildTargets/) \n[![NuGet Badge](https://buildstats.info/nuget/KsWare.MSBuildTargets)](https://www.nuget.org/packages/KsWare.MSBuildTargets/)\n\n\n## License\n\nLicensed under the [MIT licence](https://raw.githubusercontent.com/KsWare/KsWare.MSBuildTargets/licence).\n\nThanks to [Lars Skovslund](https://github.com/LarsSkovslund) and his [Project NuGet.Package.Builder](https://github.com/LarsSkovslund/NuGet.Package.Builder) to get me an example how to use .targets and .nuspec. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksware%2Fksware.msbuildtargets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksware%2Fksware.msbuildtargets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksware%2Fksware.msbuildtargets/lists"}