Skip to content

Simplify local development and streamline repository infrastructure - #1858

Open
Tera (0x5bfa) wants to merge 5 commits into
microsoft:mainfrom
0x5bfa:infra
Open

Tera (0x5bfa) wants to merge 5 commits into
microsoft:mainfrom
0x5bfa:infra

Conversation

@0x5bfa

Copy link
Copy Markdown
Contributor

Context

I understand that the repository's original author created Library.Template to make repository setup easier and more consistent. That is a useful goal, and this is not a criticism of the template or of using it across repositories.

By "focused" here, I mean the day-to-day contributor workflow: CsWin32 is a source generator with build/package integration and a substantial test matrix. Those parts have real complexity, but contributors should be able to work with the repository through Visual Studio or the standard .NET CLI without first understanding a general-purpose bootstrap and template-update layer. For this repository, the maintenance and setup overhead of that layer appears to outweigh its benefits.

Changes

  • Migrate Microsoft.Windows.CsWin32.sln to Microsoft.Windows.CsWin32.slnx and update the related documentation and build configuration.
  • Replace the local init.cmd / init.ps1 bootstrap flow with the SDK specified in global.json and standard dotnet commands.
  • Update GitHub Actions and Azure Pipelines to install SDKs and authenticate to feeds through their native setup tasks, then invoke dotnet directly.
  • Separate local package sources from the official Azure Pipelines feed configuration. Local builds use NuGet.org, with explicit source mapping for test packages available only from Microsoft's public feed.
  • Scope MicroBuild and SBOM configuration to official or explicitly enabled MicroBuild builds.
  • Remove the Library.Template update automation and associated unused helpers, along with obsolete pipeline definitions, an unreferenced GitHub Action, and unused editor/tool configuration.

The documented local workflow is:

dotnet build
dotnet test --filter "TestCategory!=HighMemory&TestCategory!=RequiresHardware"
dotnet pack -c Release

Official build and release infrastructure

The official Azure Pipelines path retains 1ESPT/MicroBuild integration, signing, SBOM generation, artifact publishing, and release/insertion workflows. It continues to use the Microsoft feed configuration and existing MicroBuild tasks.

Validation

  • Release build and Visual Studio MSBuild build of the SLNX solution.
  • dotnet pack and dotnet pack --no-build.
  • 1,881 tests passed; package-consumer tests and DocFX validation with warnings treated as errors also passed.
  • Azure/GitHub workflow YAML validation and GitHub Actions linting passed.
  • Restore with the official feed and MicroBuild configuration succeeded.

The official 1ESPT pipeline, production signing, and end-to-end artifact delivery were not run as part of this change.


If this cleanup is not a direction the maintainers want, or an unsolicited infrastructure change is not welcome, please let me know. I’m happy to close the PR or narrow its scope.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad infrastructure changes require maintainer validation of official signing, SBOM generation, and end-to-end artifact delivery.

No open issues 🎉

What changed in this PR

Simplifies CsWin32’s contributor workflow around standard .NET commands while separating local development from official build infrastructure.

Changes:

  • Migrates to SLNX and adjusts build ordering and packaging.
  • Replaces bootstrap scripts with native CI setup and separates package feeds.
  • Removes template automation, obsolete pipelines, and unused tooling.
File Description
tools/​variables/​ProfilingInputsDropName.ps1 Removes profiling-drop variable helper.
tools/​variables/​BusinessGroupName.ps1 Removes archival metadata helper.
tools/​Set-EnvVars.ps1 Removes bootstrap environment helper.
tools/​MergeFrom-Template.ps1 Removes template merging script.
tools/​Install-NuGetPackage.ps1 Removes package-install helper.
tools/​Install-NuGetCredProvider.ps1 Removes custom credential-provider installer.
tools/​Install-DotNetSdk.ps1 Removes custom SDK installer.
tools/​Get-ProcDump.ps1 Adds explicit feed configuration and failure handling.
tools/​Get-LibTemplateBasis.ps1 Removes template ancestry lookup.
tools/​Convert-PDB.ps1 Uses official package-feed configuration.
tools/​Check-DotNetSdk.ps1 Removes SDK detection helper.
tools/​Check-DotNetRuntime.ps1 Removes runtime detection helper.
tools/​artifacts/​VSInsertion.ps1 Removes OptProf artifact collection.
test/​Restore.Tests.ps1 Removes bootstrap retry tests.
test/​Microsoft.Windows.CsWin32.Tests/​MyReferenceAssemblies.cs Selects feeds by build environment.
test/​Directory.Build.targets Adds generation-tool build dependencies.
test/​Directory.Build.props Makes MicroBuild dependency conditional.
SUPPORT.md Removes standalone support guidance.
src/​VSInsertionMetadata/​VSInsertionMetadata.targets Removes profiling metadata targets.
src/​VSInsertionMetadata/​ProfilingInputs.props Removes profiling input placeholder.
src/​VSInsertionMetadata/​Library.VSInsertionMetadata.proj Removes template metadata project.
src/​OptProf.targets Removes profiling configuration.
src/​Microsoft.Windows.CsWin32/​Microsoft.Windows.CsWin32.targets Prevents reference rebuilds during no-build packing.
README.md Adds standard build instructions.
nuget.config Separates local sources using package mapping.
Microsoft.Windows.CsWin32.slnx Adds XML solution definition.
Microsoft.Windows.CsWin32.sln Removes replaced solution format.
init.ps1 Removes PowerShell bootstrap.
init.cmd Removes command-shell bootstrap.
Directory.Solution.targets Builds solution before packing when required.
Directory.Packages.props Gates MicroBuild package inclusion.
Directory.Build.props Separates local and MicroBuild configuration.
COPYRIGHT Removes standalone copyright notice.
CONTRIBUTING.md Documents revised development and official workflows.
CodeQL.yml Removes legacy classification configuration.
azure-pipelines/​vs-validation.yml Removes optional insertion-validation pipeline.
azure-pipelines/​unofficial.yml Removes obsolete exclusions and OptProf comments.
azure-pipelines/​PostPRMessage.ps1 Removes validation comment helper.
azure-pipelines/​OptProf.yml Removes profiling pipeline.
azure-pipelines/​OptProf_part2.yml Removes profiling continuation pipeline.
azure-pipelines/​official.yml Removes commented OptProf options.
azure-pipelines/​NuGetSbom.props Houses official-build output settings.
azure-pipelines/​nuget.config Adds dedicated official feed configuration.
azure-pipelines/​microbuild.before.yml Removes OptProf-specific setup.
azure-pipelines/​microbuild.after.yml Removes profiling artifact publishing.
azure-pipelines/​libtemplate-update.yml Removes Azure template-update automation.
azure-pipelines/​integration-test.yml Installs SDKs through native task.
azure-pipelines/​install-dependencies.yml Replaces bootstrap with native setup and restores.
azure-pipelines/​Get-InsertionPRId.ps1 Removes validation insertion lookup.
azure-pipelines/​dotnet.yml Removes profiling-only execution branch.
azure-pipelines/​build.yml Simplifies jobs and updates dependency setup.
azure-pipelines/​archive-sourcecode.yml Removes source archival pipeline.
azure-pipelines/​Archive-SourceCode.ps1 Removes archival request helper.
azure-pipelines.yml Removes obsolete editor-path exclusion.
.vscode/​tasks.json Removes workspace build task.
.vscode/​settings.json Removes workspace editor settings.
.vscode/​launch.json Removes debugger attachment configuration.
.vscode/​extensions.json Removes extension recommendations.
.prettierrc.yaml Removes unused formatter configuration.
.github/​workflows/​libtemplate-update.yml Removes GitHub template-update automation.
.github/​workflows/​docs.yml Uses native SDK setup and tool restore.
.github/​workflows/​docs_validate.yml Updates runner and documentation setup.
.github/​workflows/​copilot-setup-steps.yml Uses native SDK setup and package restore.
.github/​workflows/​build.yml Separates build, pack, and test setup.
.github/​actions/​publish-artifacts/​action.yaml Removes unused publishing action.
.editorconfig Defines SLNX indentation.
.config/​dotnet-tools.json Removes unused CLI tools.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants