erikej/sqlprojectpowertools/converting-to-sdk-style-project
Claude Code and agent skill by erikej/sqlprojectpowertools
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Convert a legacy (non-SDK-style) Visual Studio extension (VSIX) project to modern SDK-style csproj format. Use when the user asks how to modernize a VSIX csproj, convert a Visual Studio extension from old-style to SDK-style, simplify a VSIX project file, remove verbose MSBuild XML from an extension project, migrate a VSIX project to Microsoft.NET.Sdk, or update a Visual Studio extension project to use auto-globbing and modern NuGet PackageReferences. This skill is specifically for VSIX extension projects — not general class libraries, console apps, or other project types. Covers VSSDK and VSIX Community Toolkit (in-process) extensions targeting .NET Framework 4.8.
Install
npx vskill@latest install erikej/sqlprojectpowertools/converting-to-sdk-style-projectSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as erikej/sqlprojectpowertools/converting-to-sdk-style-project.
Converting a Visual Studio Extension (VSIX) Project to SDK-Style
SDK-style projects (<Project Sdk="Microsoft.NET.Sdk">) replace the legacy verbose .csproj format with a minimal, human-readable file. They auto-glob source files, auto-generate assembly attributes, and use implicit imports — eliminating hundreds of lines of boilerplate.
Scope: This skill is specifically for VSIX extension projects (VSSDK and VSIX Community Toolkit, in-process) targeting .NET Framework 4.8. It is not for general class libraries, console apps, or other project types. VisualStudio.Extensibility (out-of-process) projects already use SDK-style and don't need conversion.
Step-by-step conversion
1. Replace the <Project> root element
Before (legacy):
After (SDK-style):
Remove the ToolsVersion, DefaultTargets, and xmlns attributes. The SDK declaration replaces all of them.
2. Simplify the main PropertyGroup
Replace the sprawling legacy properties with a minimal set.
Remove these legacy properties (the SDK or NuGet packages handle them):
VSToolsPathand itsConditionConfiguration/Platformconditional defaultsSchemaVersionProjectTypeGuidsProjectGuidOutputType(defaults toLibrary)AppDesignerFolderRootNamespace(defaults to project name)AssemblyName(defaults to project name)IncludeAssemblyInVSIXContainerIncludeDebugSymbolsInVSIXContainerIncludeDebugSymbolsInLocalVSIXDeploymentCopyBuildOutputToOutputDirectoryCopyOutputSymbolsToOutputDirectoryStartAction,StartProgram,StartArguments(replaced by<Deploy>in the solution file)
Replace TargetFrameworkVersion with TargetFramework:
Add modern C# and VSIX settings:
Only include `<UseWPF>true</UseWPF>` if the project contains XAML files. Without it, the temporary _wpftmp.csproj that MSBuild creates during WPF/XAML compilation does not include all source files. This causes global using directives (and any other top-level declarations in non-XAML code files) to be invisible during XAML compilation, producing missing-namespace errors. Including UseWPF unconditionally is harmless when there is no XAML and prevents subtle build failures if XAML is added later.
Keep GeneratePkgDefFile and UseCodebase if they were already present — these are VSIX-specific and still needed.
3. Remove per-configuration PropertyGroups
Delete entirely the Debug|AnyCPU and Release|AnyCPU conditional PropertyGroups:
The SDK provides sensible defaults for Debug and Release configurations. Only add per-config overrides if you have genuinely custom settings.
4. Add the VSIX ProjectCapability
Add a ProjectCapability item to enable VSIX container creation:
This replaces the legacy ProjectTypeGuids approach for identifying the project as a VSIX project.
5. Remove explicit Compile items (use auto-globbing)
SDK-style projects automatically include all *.cs files. Delete all `<Compile Include="..." />` entries for regular source files.
For auto-generated files that have metadata (like AutoGen, DesignTime, DependentUpon), change Include to Update:
The Update verb applies metadata to the file that was already auto-included by the SDK glob. Using Include would cause a duplicate-item error.
Do the same for VSCommandTable.cs or any other generated file:
6. Remove legacy Import elements
Delete all of these — the SDK and NuGet packages handle them automatically:
Also remove any commented-out BeforeBuild/AfterBuild target blocks and empty <ItemGroup /> elements.
7. Update NuGet packages
Update Microsoft.VSSDK.BuildTools to version 18.5 or later and simplify its asset metadata:
Optionally add the Microsoft.VisualStudio.SDK metapackage if the project uses many individual VS interop assemblies — it replaces them all with a single reference.
Keep other packages like Community.VisualStudio.Toolkit.17 and Community.VisualStudio.VSCT as-is.
8. Clean up framework references
Remove references that are now implicit with the SDK or covered by NuGet:
System— always implicit- Any VS interop assemblies replaced by
Microsoft.VisualStudio.SDK(if added)
Keep framework references that are not covered by NuGet packages:
WPF assemblies (PresentationCore, PresentationFramework) and MEF (System.ComponentModel.Composition) must remain as explicit references since they're not included in the SDK metapackage.
9. Delete Properties/AssemblyInfo.cs
SDK-style projects auto-generate assembly attributes (AssemblyTitle, AssemblyVersion, AssemblyFileVersion, etc.). Delete Properties/AssemblyInfo.cs entirely.
If the file contains polyfills (such as IsExternalInit for C# init keyword support on .NET Framework 4.8), move them to a standalone file:
IsExternalInit.cs:
10. Update the solution file
⚠️ This must be the last edit. Modifying the.sln/.slnxfile causes Visual Studio to reload the solution, which interrupts any running automation. Always perform all other changes first, then update the solution file as the final step.
Convert .sln to .slnx (if applicable)
If the solution uses the legacy .sln format, convert it to .slnx (XML-based solution format). In Visual Studio, right-click the solution in Solution Explorer and select Save As Solution XML File, or use the CLI:
Add the Deploy element
In the .slnx file, you MUST add a <Deploy> element to the VSIX project entry. This replaces the old StartAction/StartProgram/StartArguments pattern from the legacy csproj and is required for F5 debugging to deploy the VSIX to the experimental instance:
Without the <Deploy> element, pressing F5 will build but not deploy the extension to the experimental VS instance.
Complete before/after example
Before (legacy csproj) — ~120 lines
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/converting-to-sdk-style-project/skill.md
Popularity
- Repository stars
- 34
- Repository forks
- 3
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/erikej/sqlprojectpowertools/converting-to-sdk-style-project)