{"id":15163420,"url":"https://github.com/dotnet/mvpsummithackathon2016","last_synced_at":"2025-09-30T18:32:05.707Z","repository":{"id":66010798,"uuid":"72705864","full_name":"dotnet/MVPSummitHackathon2016","owner":"dotnet","description":"Samples for the CLI extensibility hackathon for MVP Summit 2016 in Redmond!","archived":true,"fork":false,"pushed_at":"2017-02-05T03:42:12.000Z","size":42,"stargazers_count":14,"open_issues_count":0,"forks_count":12,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-09-29T21:37:36.544Z","etag":null,"topics":["cliextensions","csproj","hackathon"],"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/dotnet.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-03T03:35:57.000Z","updated_at":"2024-05-01T21:10:41.000Z","dependencies_parsed_at":"2024-01-23T21:57:19.633Z","dependency_job_id":"81dd1fdb-a6e4-47b9-a37f-33b2dfaf1104","html_url":"https://github.com/dotnet/MVPSummitHackathon2016","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FMVPSummitHackathon2016","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FMVPSummitHackathon2016/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FMVPSummitHackathon2016/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FMVPSummitHackathon2016/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet","download_url":"https://codeload.github.com/dotnet/MVPSummitHackathon2016/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234767137,"owners_count":18883388,"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":["cliextensions","csproj","hackathon"],"created_at":"2024-09-27T02:42:07.970Z","updated_at":"2025-09-30T18:32:05.288Z","avatar_url":"https://github.com/dotnet.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extensibility of the CLI toolset - sample for the hackathon\n\nThis repository contains the basic sample of an extension to the MSBuild edition of the [CLI toolset for .NET Core](https://github.com/dotnet/cli). The idea of the repo is to provide an easy way to get started with developing extensions to the CLI and the SDK in terms of both MSBuild targets as well as \"classic\" tools that can be invoked using the `dotnet-\u003ccommand\u003e` invocation pattern.\n\nThe extension in question is a proof-of-concept tool that allows the user to package a published application as a zip file. It is implemented as:\n\n1. A target that depends on the publish target from the SDK\n2. A tool that allows the user to invoke the target as `dotnet packer`\n\n## Testing it out\n\nWhile in the solution folder, run the following:\n\n```bash\n./pack.sh \ncd sample/ConsumingProject\ndotnet restore\ndotnet packer\n```\n\n\u003e **Note:** if you are using Windows, use `pack.ps1` script instead of the \\*.sh one.\n\n## SampleTargets.PackerTarget\nThis folder contains the target implementation. It also specifies configuration within the project file to package the needed files into a nuget package. Note the `build` folder in there. It contains the targets that will extend the project file. You can read more about this approach on [NuGet documentation](https://docs.nuget.org/ndocs/create-packages/creating-a-package#including-msbuild-props-and-targets-in-a-package). \n\nYou can create a nupkg out of this project by simply using the `dotnet pack` command.\n\n## dotnet-packer\nThis is a very simple console application that allows the user to invoke MSBuild without having to learn MSBuild invocation syntax. It also demonstrates an approach to building CLI tools that can interact with the targets extensions. \n\nYou can create a nupkg out of this project by simply using the `dotnet pack` command.\n\n### NuGet bug\n\nThere's a bug in NuGet that doesn't include the `*.runtimeconfig.json` in the nupkg. For your project, you'll need to copy these lines from dotnet-packer.csproj to your csproj file, changing `dotnet-packer.runtimeconfig.json` to match your project name.\n\n```  \u003cItemGroup\u003e\n    \u003cContent Include=\"$(OutputPath)\\dotnet-packer.runtimeconfig.json\"\u003e\n      \u003cPack\u003etrue\u003c/Pack\u003e\n      \u003cPackagePath\u003elib\\$(TargetFramework)\u003c/PackagePath\u003e\n    \u003c/Content\u003e\n  \u003c/ItemGroup\u003e```\n\n## A short FAQ\n\n### Is the tool neccessary if I just want to create a target?\nNo, it is not. You can have a target project just include the target and invoke it using `dotnet msbuild /t:\u003ctarget-name\u003e`. The tool is just a nicer user experience. \n\n### When should I use which one?\nTargets should be used if your extension depends on something from the build process (e.g. output) or if it needs/wants to extend something in the build process (e.g. run after a given step, depend on a given step). \n\nA tool should be used in those situations where there is no need to interact with the build process. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet%2Fmvpsummithackathon2016","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet%2Fmvpsummithackathon2016","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet%2Fmvpsummithackathon2016/lists"}