GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SixLabors/SharedInfrastructure: Centralized infrastructure elements for SixLabors projects. (msbuild, linting, shared internals)

BranchesTags
Open more actions menu

Latest commit

 

History

258 Commits
258 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
branding @ c939db5
branding @ c939db5
 
 
msbuild
msbuild
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
Directory.Build.props
Directory.Build.props
 
 
Directory.Build.targets
Directory.Build.targets
 
 
GEMINI.md
GEMINI.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SharedInfrastructure.sln
SharedInfrastructure.sln
 
 
SixLabors.snk
SixLabors.snk
 
 
THIRD-PARTY-NOTICES.TXT
THIRD-PARTY-NOTICES.TXT
 
 
ci-build.ps1
ci-build.ps1
 
 
ci-test.ps1
ci-test.ps1
 
 
codecov.yml
codecov.yml
 
 
global.json
global.json
 
 
sixlabors.ruleset
sixlabors.ruleset
 
 
sixlabors.tests.ruleset
sixlabors.tests.ruleset
 
 
stylecop.json
stylecop.json
 
 

Repository files navigation

SixLabors.SharedInfrastructure
SixLabors.SharedInfrastructure

Build Status Code coverage License: Six Labors Split

This repository contains:

  • Configuration and guidelines for automated linting of C# projects.
  • Standardized internal C# utility classes to be reused across SixLabors projects (like Guard, DebugGuard)
  • SixLabors.snk to support strong-name signing of SixLabors assemblies
  • Centralized msbuild configuration and utilities for SixLabors projects

It is designed to be installed as a git submodule into Six Labors solutions.

Installation.

This installation guide assumes that your solution conforms to the following structure:

solution.sln
readme.md
.gitignore
+---> src
+      +
+      +---> project
+      +   +
+      +   +---> project.csproj
+      +
+      +---> project
+          +
+          +---> project.csproj
+
+---> tests
       +
       +---> project.tests
       +   +
       +   +---> project.tests.csproj
       +
       +---> project.tests
           +
           +---> project.tests.csproj

If the solution does not conform to this structure you will have to update it to do so.

Adding the Submodule

To add SixLabors.SharedInfrastructure as a submodule of your project. In the project repository type:

git submodule add https://github.com/SixLabors/SharedInfrastructure shared-infrastructure

At this point, you’ll have a shared-infrastructure folder inside your project, but if you were to peek inside that folder, depending on your version of Git, you might see… nothing.

Newer versions of Git will do this automatically, but older versions will require you to explicitly tell Git to download the contents of shared-infrastructure:

git submodule update --init --recursive

If everything looks good, you can commit this change and you’ll have a shared-infrastructure folder in your project repository with all the content from the SixLabors.SharedInfrastructure repository.

Updating the Submodule.

Since the submodule is stored in a separate repository you may find at times updates have been made to the linting rules that require you to update your copy. The command below will allow you to do so:

git submodule update --init --recursive
git submodule foreach git pull origin main

Linting Tools

There are three tools contained within the submodule that will help to automatically promote and enforce coding standards and consistency:

  • .gitattributes
  • .editorconfig
  • StyleCop Analyzers

The build also copies repository-wide AI coding guidance for tools that support AGENTS.md, CLAUDE.md, GEMINI.md, and .github/copilot-instructions.md.

These tools are automatically installed into your solution by referencing the .props and .targets files found in the /msbuild folder.

.NET SDK Resolution (global.json)

The repository root contains a global.json that controls .NET SDK resolution for all SixLabors repositories:

  • version and rollForward: latestMajor set a floor of .NET 10. Resolution selects the newest installed SDK at or above that floor.
  • allowPrerelease: true lets the CLI and Visual Studio use a preview SDK when one is installed. Machines without a preview SDK resolve the newest stable release.

The build copies this file to consuming repositories together with the other shared config files. Commit the copied file, as you do with .editorconfig and .gitattributes.

Preview target frameworks are opt-in. Set the SIXLABORS_TESTING_PREVIEW environment variable to True to add them to TargetFrameworks. CI preview lanes set this variable and install the preview SDK with the dotnet-quality: preview option of setup-dotnet.

MsBuild

Within the aforementioned folder there are separate .props and .targets files designed for shared, src, and test scenarios. These files control the build process and are responsible for automatically referencing all the required projects for versioning, linting and testing. An example use case and installation can be found at the ImageSharp repository.

About

Centralized infrastructure elements for SixLabors projects. (msbuild, linting, shared internals)

Topics

editorconfigstylecop-analyzers

Resources

Readme
License

Security policy

Security policy
Activity
Custom properties

Stars

30 stars

Watchers

4 watching

Forks

15 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.