Skip to content

Modernize the build: .slnx solution, SDK-style projects, central package management, C# 14, dotnet build #59

Open

Description

@xperiandri

Why

The two projects of this repository are still in the old format, with every file listed by hand. This issue tracks a chain of small pull requests that bring them to what the current Visual Studio extension templates use: an XML solution file, SDK-style projects that include files by globbing (the project files shrink from 181 and 104 lines to 82 and 31), one place for the package versions, a current C# language version and a build that works from the command line with dotnet build. Each pull request is small, builds on its own, is verified on a clean runner in a fork and describes what it changes. None of them changes the code of the extension, and the VSIX keeps its assemblies, manifest and pkgdef.

The pull requests, in merge order

The branches build on each other (each contains the commits of the earlier ones until they are merged), and each pull request can be taken or left as far as the dependencies allow.

What it costs

  • The .slnx needs Visual Studio 2022 17.13 or later, or the .NET SDK 9.0.200 or later, and nuget restore cannot restore it (msbuild -restore and dotnet restore can).
  • F5 for an SDK-style VSIX project needs Visual Studio 2026 18.5 or later. Building works with Visual Studio 2022 17.14 (the CI) and with 2026.
  • C# 14 needs the .NET SDK 10 or Visual Studio 2026 on a development machine; the windows-2022 image has the SDK 10.
  • The signing target in src/signvsix.targets has to be called SignAndCopyVsix instead of AfterBuild, because in an SDK-style project the SDK replaces AfterBuild and the signing would silently never run (checked with a fake sign tool; the real signing was not run).
  • Three .pdb files of NuGet packages are no longer in the VSIX, and the .pdb of the extension is a portable PDB.

Not part of this

  • The unit tests keep MSTest 3.6.3 with the VSTest adapter; moving to a newer MSTest and dotnet test (which needs Microsoft.NET.Test.Sdk) can be a follow-up.
  • Watch .slnx solution files as well as .sln #51 (the extension watching .slnx solutions of its users) is independent. It adds a Compile line to the old test project, so whichever of it and the SDK-style conversion is merged second needs a trivial rebase.
  • The step Publish Test Results of build.yaml fails today on windows-2022, also on main, because the image has no Python for that third-party action (actions/setup-python before it would fix that).

Not verified: running the extension in the Experimental instance, F5 from Visual Studio 2022, and the signing with the real certificate.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions