Repository navigation
Convert the projects to the SDK style - #55
Open
xperiandri wants to merge 3 commits into
Open
xperiandri wants to merge 3 commits into
xperiandri wants to merge 3 commits into
Conversation
`dotnet sln migrate` produced `StringResourceVisualizer.slnx` from `StringResourceVisualizer.sln`, and the old file is removed. The projects and the solution items are the same. The project ids are the ones of the old solution, which is what Visual Studio writes into the file itself. The `.slnx` format is XML, much shorter than the `.sln`, and designed to reduce merge conflicts (https://devblogs.microsoft.com/visualstudio/new-simpler-solution-file-format/). Building it needs the .NET SDK 9.0.200 or later, or MSBuild from Visual Studio or Build Tools 17.13 or later. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
Both projects use `Microsoft.NET.Sdk` with `net481` now, and `VSSDKBuildToolsAutoSetup` with `Microsoft.VSSDK.BuildTools` 18.5 builds the VSIX. The source files are included by globbing; the extension project excludes the folder of the test project, which lies inside its own folder. `Properties\AssemblyInfo.cs` stays, because the version comes from the `Vsix` constants, and the output stays in `bin\Debug\` and `bin\Release\`. The signing target is called `SignAndCopyVsix` and runs after `Build`. As `AfterBuild` it would be replaced by the SDK targets and never run. The packages and their versions are the same, apart from the added `Microsoft.VSSDK.BuildTools`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Visual Studio 2026 18.5 and later deploys an SDK-style VSIX project to the Experimental instance on F5 only when the solution has a `<Deploy>` element for it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
xperiandri
force-pushed
the
chain/sdk-style
branch
from
October 29, 2026 01:18
54d4042 to
f4ae367
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #53. The branch contains the commits of #53 and of the pull requests before it, so the last 2 commits are new here.
This pull request converts the extension project and the test project to the SDK style (
Microsoft.NET.Sdk,net481), which Visual Studio 2026 18.5 and later expects of an extension project (SDK-style support for extension projects). It requires #53: itsStringResourceVisualizer.slnxgets the<Deploy>element here. It does not depend on the AI pull request #54; both start at #53. The matching update of the instructions is part of the last pull request of the chain (#69), because the instructions live in the files that #54 adds. The code does not change.Chain, changes, things to know and verification
Chain
This pull request is part of a chain of small pull requests that all target
main. After #53 the chain has two branches that do not depend on each other: the AI agent files (#54) and the modernization of the build (#55 to #58). The last pull request (#69) merges both and updates the instructions, which live in the files of the AI branch. The branch of each pull request contains the commits of the ones it is stacked on, so GitHub lists those commits here until they are merged. Merge in this order and review only the commits that are new in each pull request:.slnxformat #53 – Switch the solution to the.slnxformat (first in the chain, no dependencies).slnxformat #53).slnxformat #53) – this pull requestdotnet build#58 – Build withdotnet build(stacked on Set the C# language version to 14 #57)dotnet build#69 – Update the instructions for the SDK-style projects, central package management, C# 14 anddotnet build(stacked on Build withdotnet build#58 and Add instructions, skills and MCP configuration for AI coding agents #54)Changes
Compileitems are gone;Updateitems keep the metadata that the designers and the generator need (OptionsGrid.csis a component,source.extension.csdepends on the manifest and its custom tool). The test project lies inside the folder of the extension project, so the extension project excludesStringResourceVisualizer.Tests\**from its globbing.GenerateAssemblyInfois off in both projects (theAssemblyInfo.csfiles stay, and the version comes from theVsixconstants),AppendTargetFrameworkToOutputPathis off (the output stays inbin\Debug\andbin\Release\, where the workflow and the signing step expect it), andCopyOutputSymbolsToOutputDirectorystaysfalseas it was.VSSDKBuildToolsAutoSetupwithMicrosoft.VSSDK.BuildTools18.5.40034, which adds theVsixSdkStyleproject capability, builds the VSIX;GeneratePkgDefFile,UseCodebaseand the twoIncludeDebugSymbolsIn...properties keep their values. The package is the only addition to the package list, and the versions are the old ones.ProjectGuidandProjectTypeGuids(the solution holds the project id), the start options (StartAction,StartProgram,StartArguments), the per-configuration property groups,SignAssembly(it wastruewith an empty key file, so the assembly was not signed before and is not now),MinimumVisualStudioVersion, the explicit imports of the common and the VSSDK targets,NuGetPackageImportStamp, the emptyEnsureNuGetPackageBuildImportstarget and the properties that repeat a default. The framework references that are not implicit stay.src/signvsix.targets: the target is renamed fromAfterBuildtoSignAndCopyVsixand runsAfterTargets="Build"(see below).StringResourceVisualizer.slnxmarks the extension project with<Deploy Solution="Debug|Any CPU" />, which Visual Studio needs to deploy it on F5.Things to know
AfterBuild, so the signing would silently never run. I checked that with a fakesigntool: withSM_CERT_FP_SHA256set, aReleasebuild of the old project and of the new one call the tool with the same arguments after the VSIX exists and then create the versioned copyStringResourceVisualizer.1_23_3.vsix; with the old target name the tool is never called. I could not run the real signing..pdbfiles of NuGet packages (Microsoft.ApplicationInsights,Microsoft.CodeAnalysis.ScriptingandMicrosoft.DiaSymReader, about 1.7 MB inDebug) are no longer in it, because the SDK does not copy the symbols of packages next to the assemblies (14 such files are gone frombintoo), and the.pdbof the extension is a portable PDB now, about a quarter of the size.Resources\LICENSEis copied to the output folder as well.#if(#if !DEBUG), so the new predefined symbols (NETFRAMEWORK,NET481,NET48_OR_GREATERand so on) change nothing. The NuGet audit warnings (NU1902andNU1903forMessagePack) now appear twice in the build log, because the SDK repeats the restore warnings at build time; the distinct warnings are the same.<Compile Include="StringExtensionsTests.cs" />to the old test project. With globbing that line is not needed, so whichever of the two is merged second needs a trivial rebase.Verification
maininDebugandRelease(the MSBuild of Visual Studio 2026 18.12; the old projects with-p:TargetFrameworkVersion=v4.8, the new ones withnet481, because the machine has no 4.8.1 targeting pack): the same 26 distinct warnings; the same 19 compile items; the same references apart from five that the SDK and the build tools add; identical fingerprints of both assemblies (references, resources, every type and method with the IL size); the same VSIX entries apart from the three.pdbfiles and the sizes of the extension's own files (and ofmanifest.jsonandcatalog.json, which list them); identicalextension.vsixmanifest, pkgdef and content types; the 4 tests pass. A second build with the stable .NET SDK 10.0.402 (the machine's default is a preview) gives the same.windows-2022runner:Buildbuilds the solution and runs the 4 tests, which pass. As on the unchangedmain(run), the stepPublish Test Resultsfails there: the third-party actionEnricoMi/publish-unit-test-result-actionfinds no Python interpreter on the image. This pull request neither causes nor changes it.🤖 Generated with Claude Code