The StreamJsonRpc library offers JSON-RPC 2.0 over any .NET Stream, WebSocket, or Pipe. With bonus support for request cancellation, client proxy generation, and more.
Перейти к файлу
Andrew Arnott 86a18ec2dd
Ignore .lutconfig files
2022-04-23 10:02:34 -06:00
.devcontainer Update devcontainer Dockerfile to match global.json 2022-04-11 13:46:40 -06:00
.github Update GitHub Actions to more closely resemble AzP 2022-02-04 20:34:01 -07:00
.vscode Touch-ups 2021-11-18 21:43:01 -07:00
azure-pipelines Improve pipeline verbosity 2022-04-12 08:30:10 -06:00
src Secure p/invoke native library loads 2021-12-02 10:59:00 -07:00
test Bump coverlet.msbuild from 3.1.1 to 3.1.2 (#144) 2022-03-06 14:25:10 +00:00
tools Merge pull request #147 from AArnott/fixSdkInstallScript 2022-03-30 10:11:12 -06:00
.editorconfig Remove CA1508, which has too many false positives 2021-11-22 15:49:58 -07:00
.gitattributes Checkout ps1 with LF endings 2020-09-25 12:26:36 -06:00
.gitignore Ignore .lutconfig files 2022-04-23 10:02:34 -06:00
Apply-Template.ps1 Protect against misapplication of the Apply-Template script 2022-04-14 09:37:10 -06:00
CONTRIBUTING.md Beef up contrib doc explanation of init.ps1 2020-08-23 12:58:47 -06:00
Directory.Build.props Remove explicit Microsoft.NETFramework.ReferenceAssemblies PackageReference 2022-04-11 17:41:52 -06:00
Directory.Build.rsp Add Directory.Build.rsp file 2020-03-03 09:50:03 -07:00
Directory.Build.targets Get WPF inner-builds to import NuGet packages' imports 2020-08-10 09:13:44 -06:00
Expand-Template.cmd Add Expand-Template.cmd stub 2019-11-14 21:57:40 -07:00
Expand-Template.ps1 Fix Expand-Template to replace tokens in AssemblyInfo.cs 2022-01-13 08:26:38 -07:00
LICENSE Add script for proper expansion 2019-06-17 09:37:46 -06:00
Library.sln Add README as solution item 2020-05-11 09:40:59 -06:00
README.md Document how to create a merge commit in a Library.Template based repo 2022-04-14 07:08:52 -06:00
azure-pipelines.yml Simplify release and CI package push 2022-03-31 10:15:07 -06:00
global.json Update .NET SDK to 6.0.200 2022-03-08 09:02:53 -07:00
init.cmd Fix up init.cmd to set env vars from .ps1 child process 2020-08-19 12:13:49 -06:00
init.ps1 Format whitespace in init.ps1 2021-11-29 16:17:37 -07:00
nuget.config Stabilize package restore in the face of outside influences 2021-09-23 16:56:28 -06:00
strongname.snk Fix build and snk updates during template expansion 2020-07-24 08:46:23 -06:00
stylecop.json Use top-level test folder 2020-04-09 23:33:39 -06:00
version.json Disable default, redundant NB.GV behavior 2021-11-02 06:13:29 -06:00

README.md

Your Library

An awesome template for your awesome library

NuGet package

Azure Pipelines status GitHub Actions status codecov

Features

  • Follow the best and simplest patterns of build, pack and test with dotnet CLI.
  • Init script that installs prerequisites and auth helpers, supporting both non-elevation and elevation modes.
  • Static analyzers: FxCop and StyleCop
  • Read-only source tree (builds to top-level bin/obj folders)
  • Auto-versioning (via Nerdbank.GitVersioning)
  • Builds with a "pinned" .NET Core SDK to ensure reproducible builds across machines and across time.
  • Automatically pack the library and publish it as an artifact, and even push it to some NuGet feed for consumption.
  • Testing
    • Testing on .NET Framework, multiple .NET Core versions
    • Testing on Windows, Linux and OSX
    • Tests that crash or hang in Azure Pipelines automatically collect dumps and publish as a pipeline artifact for later investigation.
  • Cloud build support
    • YAML based build for long-term serviceability, and PR review opportunities for any changes.
    • Azure Pipelines and GitHub Action support
    • Emphasis on PowerShell scripts over reliance on tasks for a more locally reproducible build.
    • Code coverage published to Azure Pipelines
    • Code coverage published to codecov.io so GitHub PRs get code coverage results added as a PR comment

Consumption

Once you've expanded this template for your own use, you should run the Expand-Template.ps1 script to customize the template for your own project.

Further customize your repo by:

  1. Verify the license is suitable for your goal as it appears in the LICENSE and stylecop.json files and the Directory.Build.props file's PackageLicenseExpression property.
  2. Reset or replace the badges at the top of this file.

Maintaining your repo based on this template

The best way to keep your repo in sync with this template's evolving features and best practices is to periodically merge the template into your repo:

git checkout main          # your default branch
git pull                   # make sure you're at tip
git fetch libtemplate      # fetch latest Library.Template
git merge libtemplate/main

There will frequently be merge conflicts to work out, but they will be easier to resolve than running the Apply-Template.ps1 script every time, which simply blows away all your local changes with the latest from the template.

If you do not already have Library.Template history in your repo or have never completed a merge before, the above steps may produce errors. To get it working the first time, follow these steps:

git remote add libtemplate https://github.com/AArnott/Library.Template.git
git fetch libtemplate

If the git merge step described earlier still fails for you, you may need to artificially create your first merge. First, you must have a local clone of Library.Template on your box:

git clone https://github.com/AArnott/Library.Template.git

Make sure you have either main checked out in that clone, as appropriate to match. Use git rev-parse HEAD within the Library.Template repo and record the resulting commit as we'll use it later.

Run the Apply-Template.ps1 script, passing in the path to your own Library.Template-based repo. This will blow away most customizations you may have made to your repo's build authoring. You should carefully review all changes to your repo, staging those changes that you want to keep and reverting those that remove customizations you made.

Now it's time to commit your changes. We do this in a very low-level way in order to have git record this as a merge commit even though it didn't start as a merge. By doing this, git will allow future merges from libtemplate/main and only new changes will be brought down, which will be much easier than the Apply-Template.ps1 script you just ran. We create the merge commit with these commands:

  1. Be sure to have staged or reverted all the changes in your repo.
  2. Run git write-tree within your repo. This will print out a git tree hash.
  3. Run git commit-tree -p HEAD -p A B -m "Merged latest Library.Template", where A is the output from git rev-parse HEAD that you recorded earlier, and B is the output from your prior git write-tree command.
  4. Run git merge X where X is the output of the git commit-tree command.

Congratulations. You're all done. Next time you want to sync to latest from Library.Template, you can the simple git merge steps given at the start of this section.