[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVF8889876MZJW01SS3X1F":3,"skill-same:01M7CVF8889876MZJW01SS3X1F":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7CVF8889876MZJW01SS3X1F","msbuild-modernization",null,"Guide for modernizing and migrating MSBuild project files to SDK-style format. USE FOR: converting legacy .csproj\u002F.vbproj with verbose XML to SDK-style, migrating packages.config to PackageReference, removing Properties\u002FAssemblyInfo.cs in favor of auto-generation, eliminating explicit Compile Include lists via implicit globbing, consolidating shared settings into Directory.Build.props. Indicators of legacy projects: ToolsVersion attribute, an Import of Microsoft.CSharp.targets via $(MSBuildToolsPath), .csproj files over 50 lines for simple projects. DO NOT USE FOR: projects already in SDK-style format, non-.NET build systems (npm, Maven, CMake), .NET Framework projects that cannot move to SDK-style.","deadmade\u002Fdead-agent-skills","deadmade","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130925709?v=4","01M7CTQ65AGYR4J9K9TX0YR9V3","01M7CTQ66B4VMJFEDZP4EKKE6K",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fmsbuild-modernization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: msbuild-modernization\ndescription: \"Guide for modernizing and migrating MSBuild project files to SDK-style format. USE FOR: converting legacy .csproj\u002F.vbproj with verbose XML to SDK-style, migrating packages.config to PackageReference, removing Properties\u002FAssemblyInfo.cs in favor of auto-generation, eliminating explicit Compile Include lists via implicit globbing, consolidating shared settings into Directory.Build.props. Indicators of legacy projects: ToolsVersion attribute, an Import of Microsoft.CSharp.targets via $(MSBuildToolsPath), .csproj files over 50 lines for simple projects. DO NOT USE FOR: projects already in SDK-style format, non-.NET build systems (npm, Maven, CMake), .NET Framework projects that cannot move to SDK-style.\"\nlicense: MIT\n---\n\n# MSBuild Modernization: Legacy to SDK-style Migration\n\n## Identifying Legacy vs SDK-style Projects\n\n**Legacy indicators:**\n\n- `\u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>`\n- Explicit file lists (`\u003CCompile Include=\"...\" \u002F>` for every `.cs` file)\n- `ToolsVersion` attribute on `\u003CProject>` element\n- `packages.config` file present\n- `Properties\\AssemblyInfo.cs` with assembly-level attributes\n\n**SDK-style indicators:**\n\n- `\u003CProject Sdk=\"Microsoft.NET.Sdk\">` attribute on root element\n- Minimal content — a simple project may be 10–15 lines\n- No explicit file includes (implicit globbing)\n- `\u003CPackageReference>` items instead of `packages.config`\n\n**Quick check:** if a `.csproj` is more than 50 lines for a simple class library or console app, it is likely legacy format.\n\n```xml\n\u003C!-- Legacy: ~80+ lines for a simple library -->\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003CProject ToolsVersion=\"15.0\" xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdeveloper\u002Fmsbuild\u002F2003\">\n  \u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" \u002F>\n  \u003CPropertyGroup>\n    \u003CConfiguration Condition=\" '$(Configuration)' == '' \">Debug\u003C\u002FConfiguration>\n    \u003CPlatform Condition=\" '$(Platform)' == '' \">AnyCPU\u003C\u002FPlatform>\n    \u003COutputType>Library\u003C\u002FOutputType>\n    \u003CRootNamespace>MyLibrary\u003C\u002FRootNamespace>\n    \u003CAssemblyName>MyLibrary\u003C\u002FAssemblyName>\n    \u003CTargetFrameworkVersion>v4.7.2\u003C\u002FTargetFrameworkVersion>\n    \u003CFileAlignment>512\u003C\u002FFileAlignment>\n    \u003CDeterministic>true\u003C\u002FDeterministic>\n  \u003C\u002FPropertyGroup>\n  \u003C!-- ... 60+ more lines ... -->\n  \u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\u003C\u002FProject>\n```\n\n```xml\n\u003C!-- SDK-style: ~8 lines for the same library -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net472\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n## Migration Checklist: Legacy → SDK-style\n\n### Step 1: Replace Project Root Element\n\n**BEFORE:**\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003CProject ToolsVersion=\"15.0\" xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdeveloper\u002Fmsbuild\u002F2003\">\n  \u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\"\n          Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" \u002F>\n  \u003C!-- ... project content ... -->\n  \u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\u003C\u002FProject>\n```\n\n**AFTER:**\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003C!-- ... project content ... -->\n\u003C\u002FProject>\n```\n\nRemove the XML declaration, `ToolsVersion`, `xmlns`, and both `\u003CImport>` lines. The `Sdk` attribute replaces all of them.\n\n### Step 2: Set TargetFramework\n\n**BEFORE:**\n\n```xml\n\u003CPropertyGroup>\n  \u003CTargetFrameworkVersion>v4.7.2\u003C\u002FTargetFrameworkVersion>\n\u003C\u002FPropertyGroup>\n```\n\n**AFTER:**\n\n```xml\n\u003CPropertyGroup>\n  \u003CTargetFramework>net472\u003C\u002FTargetFramework>\n\u003C\u002FPropertyGroup>\n```\n\n**TFM mapping table:**\n\n| Legacy `TargetFrameworkVersion` | SDK-style `TargetFramework` |\n|---------------------------------|-----------------------------|\n| `v4.6.1`                        | `net461`                    |\n| `v4.7.2`                        | `net472`                    |\n| `v4.8`                          | `net48`                     |\n| (migrating to .NET 6)           | `net6.0`                    |\n| (migrating to .NET 8)           | `net8.0`                    |\n\n### Step 3: Remove Explicit File Includes\n\n**BEFORE:**\n\n```xml\n\u003CItemGroup>\n  \u003CCompile Include=\"Controllers\\HomeController.cs\" \u002F>\n  \u003CCompile Include=\"Models\\User.cs\" \u002F>\n  \u003CCompile Include=\"Models\\Order.cs\" \u002F>\n  \u003CCompile Include=\"Services\\AuthService.cs\" \u002F>\n  \u003CCompile Include=\"Services\\OrderService.cs\" \u002F>\n  \u003CCompile Include=\"Properties\\AssemblyInfo.cs\" \u002F>\n  \u003C!-- ... 50+ more lines ... -->\n\u003C\u002FItemGroup>\n\u003CItemGroup>\n  \u003CContent Include=\"Views\\Home\\Index.cshtml\" \u002F>\n  \u003CContent Include=\"Views\\Shared\\_Layout.cshtml\" \u002F>\n  \u003C!-- ... more content files ... -->\n\u003C\u002FItemGroup>\n```\n\n**AFTER:**\n\nDelete all of these `\u003CCompile>` and `\u003CContent>` item groups entirely. SDK-style projects include them automatically via implicit globbing.\n\n**Exception:** keep explicit entries only for files that need special metadata or reside outside the project directory:\n\n```xml\n\u003CItemGroup>\n  \u003CContent Include=\"..\\shared\\config.json\" Link=\"config.json\" CopyToOutputDirectory=\"PreserveNewest\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n### Step 4: Remove AssemblyInfo.cs\n\n**BEFORE** (`Properties\\AssemblyInfo.cs`):\n\n```csharp\nusing System.Reflection;\nusing System.Runtime.InteropServices;\n\n[assembly: AssemblyTitle(\"MyLibrary\")]\n[assembly: AssemblyDescription(\"A useful library\")]\n[assembly: AssemblyCompany(\"Contoso\")]\n[assembly: AssemblyProduct(\"MyLibrary\")]\n[assembly: AssemblyCopyright(\"Copyright © Contoso 2024\")]\n[assembly: ComVisible(false)]\n[assembly: Guid(\"...\")]\n[assembly: AssemblyVersion(\"1.2.0.0\")]\n[assembly: AssemblyFileVersion(\"1.2.0.0\")]\n```\n\n**AFTER** (in `.csproj`):\n\n```xml\n\u003CPropertyGroup>\n  \u003CAssemblyTitle>MyLibrary\u003C\u002FAssemblyTitle>\n  \u003CDescription>A useful library\u003C\u002FDescription>\n  \u003CCompany>Contoso\u003C\u002FCompany>\n  \u003CProduct>MyLibrary\u003C\u002FProduct>\n  \u003CCopyright>Copyright © Contoso 2024\u003C\u002FCopyright>\n  \u003CVersion>1.2.0\u003C\u002FVersion>\n\u003C\u002FPropertyGroup>\n```\n\nDelete `Properties\\AssemblyInfo.cs` — the SDK auto-generates assembly attributes from these properties.\n\n**Alternative:** if you prefer to keep `AssemblyInfo.cs`, disable auto-generation:\n\n```xml\n\u003CPropertyGroup>\n  \u003CGenerateAssemblyInfo>false\u003C\u002FGenerateAssemblyInfo>\n\u003C\u002FPropertyGroup>\n```\n\n### Step 5: Migrate packages.config → PackageReference\n\n**BEFORE** (`packages.config`):\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003Cpackages>\n  \u003Cpackage id=\"Newtonsoft.Json\" version=\"13.0.3\" targetFramework=\"net472\" \u002F>\n  \u003Cpackage id=\"Serilog\" version=\"3.1.1\" targetFramework=\"net472\" \u002F>\n  \u003Cpackage id=\"Microsoft.Extensions.DependencyInjection\" version=\"8.0.0\" targetFramework=\"net472\" \u002F>\n\u003C\u002Fpackages>\n```\n\n**AFTER** (in `.csproj`):\n\n```xml\n\u003CItemGroup>\n  \u003CPackageReference Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n  \u003CPackageReference Include=\"Serilog\" Version=\"3.1.1\" \u002F>\n  \u003CPackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"8.0.0\" \u002F>\n\u003C\u002FItemGroup>\n```\n\nDelete `packages.config` after migration.\n\n**Migration options:**\n\n- **Visual Studio:** right-click `packages.config` → *Migrate packages.config to PackageReference*\n- **CLI:** `dotnet migrate-packages-config` or manual conversion\n- **Binding redirects:** SDK-style projects auto-generate binding redirects — remove the `\u003Cruntime>` section from `app.config` if present\n\n### Step 6: Remove Unnecessary Boilerplate\n\nDelete all of the following — the SDK provides sensible defaults:\n\n```xml\n\u003C!-- DELETE: SDK imports (replaced by Sdk attribute) -->\n\u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" ... \u002F>\n\u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\n\u003C!-- DELETE: default Configuration\u002FPlatform (SDK provides these) -->\n\u003CPropertyGroup>\n  \u003CConfiguration Condition=\" '$(Configuration)' == '' \">Debug\u003C\u002FConfiguration>\n  \u003CPlatform Condition=\" '$(Platform)' == '' \">AnyCPU\u003C\u002FPlatform>\n  \u003CProjectGuid>{...}\u003C\u002FProjectGuid>\n  \u003COutputType>Library\u003C\u002FOutputType>  \u003C!-- keep only if not Library -->\n  \u003CAppDesignerFolder>Properties\u003C\u002FAppDesignerFolder>\n  \u003CFileAlignment>512\u003C\u002FFileAlignment>\n  \u003CAutoGenerateBindingRedirects>true\u003C\u002FAutoGenerateBindingRedirects>\n  \u003CDeterministic>true\u003C\u002FDeterministic>\n\u003C\u002FPropertyGroup>\n\n\u003C!-- DELETE: standard Debug\u002FRelease configurations (SDK defaults match) -->\n\u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n  \u003CDebugSymbols>true\u003C\u002FDebugSymbols>\n  \u003CDebugType>full\u003C\u002FDebugType>\n  \u003COptimize>false\u003C\u002FOptimize>\n  \u003COutputPath>bin\\Debug\\\u003C\u002FOutputPath>\n  \u003CDefineConstants>DEBUG;TRACE\u003C\u002FDefineConstants>\n  \u003CErrorReport>prompt\u003C\u002FErrorReport>\n  \u003CWarningLevel>4\u003C\u002FWarningLevel>\n\u003C\u002FPropertyGroup>\n\u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n  \u003CDebugType>pdbonly\u003C\u002FDebugType>\n  \u003COptimize>true\u003C\u002FOptimize>\n  \u003COutputPath>bin\\Release\\\u003C\u002FOutputPath>\n  \u003CDefineConstants>TRACE\u003C\u002FDefineConstants>\n  \u003CErrorReport>prompt\u003C\u002FErrorReport>\n  \u003CWarningLevel>4\u003C\u002FWarningLevel>\n\u003C\u002FPropertyGroup>\n\n\u003C!-- DELETE: framework assembly references (implicit in SDK) -->\n\u003CItemGroup>\n  \u003CReference Include=\"System\" \u002F>\n  \u003CReference Include=\"System.Core\" \u002F>\n  \u003CReference Include=\"System.Data\" \u002F>\n  \u003CReference Include=\"System.Xml\" \u002F>\n  \u003CReference Include=\"System.Xml.Linq\" \u002F>\n  \u003CReference Include=\"Microsoft.CSharp\" \u002F>\n\u003C\u002FItemGroup>\n\n\u003C!-- DELETE: packages.config reference -->\n\u003CNone Include=\"packages.config\" \u002F>\n\n\u003C!-- DELETE: designer service entries -->\n\u003CService Include=\"{508349B6-6B84-11D3-8410-00C04F8EF8E0}\" \u002F>\n```\n\n**Keep** only properties that differ from SDK defaults (e.g., `\u003COutputType>Exe\u003C\u002FOutputType>`, `\u003CRootNamespace>` if it differs from the assembly name, custom `\u003CDefineConstants>`).\n\n### Step 7: Enable Modern Features\n\nAfter migration, consider enabling modern C# features:\n\n```xml\n\u003CPropertyGroup>\n  \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n  \u003CNullable>enable\u003C\u002FNullable>\n  \u003CImplicitUsings>enable\u003C\u002FImplicitUsings>\n\u003C\u002FPropertyGroup>\n```\n\n- `\u003CNullable>enable\u003C\u002FNullable>` — enables nullable reference type analysis\n- `\u003CImplicitUsings>enable\u003C\u002FImplicitUsings>` — auto-imports common namespaces (.NET 6+)\n- **Avoid `\u003CLangVersion>latest`** — the effective language version is determined by the SDK\u002Fcompiler defaults, not just the TFM, so builds can silently vary across machines with different SDKs installed. Omit `\u003CLangVersion>` unless you need to pin a specific version. For reproducible builds, pin the SDK version repo-wide with `global.json` (which indirectly fixes the default language version), or set an explicit numeric `\u003CLangVersion>` (e.g. `\u003CLangVersion>12\u003C\u002FLangVersion>`) per project to directly control the language version.\n\n## Complete Before\u002FAfter Example\n\n**BEFORE** (legacy — 65 lines):\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003CProject ToolsVersion=\"15.0\" xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdeveloper\u002Fmsbuild\u002F2003\">\n  \u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\"\n          Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" \u002F>\n  \u003CPropertyGroup>\n    \u003CConfiguration Condition=\" '$(Configuration)' == '' \">Debug\u003C\u002FConfiguration>\n    \u003CPlatform Condition=\" '$(Platform)' == '' \">AnyCPU\u003C\u002FPlatform>\n    \u003CProjectGuid>{12345678-1234-1234-1234-123456789ABC}\u003C\u002FProjectGuid>\n    \u003COutputType>Library\u003C\u002FOutputType>\n    \u003CAppDesignerFolder>Properties\u003C\u002FAppDesignerFolder>\n    \u003CRootNamespace>MyLibrary\u003C\u002FRootNamespace>\n    \u003CAssemblyName>MyLibrary\u003C\u002FAssemblyName>\n    \u003CTargetFrameworkVersion>v4.7.2\u003C\u002FTargetFrameworkVersion>\n    \u003CFileAlignment>512\u003C\u002FFileAlignment>\n    \u003CDeterministic>true\u003C\u002FDeterministic>\n  \u003C\u002FPropertyGroup>\n  \u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    \u003CDebugSymbols>true\u003C\u002FDebugSymbols>\n    \u003CDebugType>full\u003C\u002FDebugType>\n    \u003COptimize>false\u003C\u002FOptimize>\n    \u003COutputPath>bin\\Debug\\\u003C\u002FOutputPath>\n    \u003CDefineConstants>DEBUG;TRACE\u003C\u002FDefineConstants>\n    \u003CErrorReport>prompt\u003C\u002FErrorReport>\n    \u003CWarningLevel>4\u003C\u002FWarningLevel>\n  \u003C\u002FPropertyGroup>\n  \u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    \u003CDebugType>pdbonly\u003C\u002FDebugType>\n    \u003COptimize>true\u003C\u002FOptimize>\n    \u003COutputPath>bin\\Release\\\u003C\u002FOutputPath>\n    \u003CDefineConstants>TRACE\u003C\u002FDefineConstants>\n    \u003CErrorReport>prompt\u003C\u002FErrorReport>\n    \u003CWarningLevel>4\u003C\u002FWarningLevel>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CReference Include=\"System\" \u002F>\n    \u003CReference Include=\"System.Core\" \u002F>\n    \u003CReference Include=\"System.Xml.Linq\" \u002F>\n    \u003CReference Include=\"Microsoft.CSharp\" \u002F>\n  \u003C\u002FItemGroup>\n  \u003CItemGroup>\n    \u003CCompile Include=\"Models\\User.cs\" \u002F>\n    \u003CCompile Include=\"Models\\Order.cs\" \u002F>\n    \u003CCompile Include=\"Services\\UserService.cs\" \u002F>\n    \u003CCompile Include=\"Services\\OrderService.cs\" \u002F>\n    \u003CCompile Include=\"Helpers\\StringExtensions.cs\" \u002F>\n    \u003CCompile Include=\"Properties\\AssemblyInfo.cs\" \u002F>\n  \u003C\u002FItemGroup>\n  \u003CItemGroup>\n    \u003CNone Include=\"packages.config\" \u002F>\n  \u003C\u002FItemGroup>\n  \u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\u003C\u002FProject>\n```\n\n**AFTER** (SDK-style — 11 lines):\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net472\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n    \u003CPackageReference Include=\"Serilog\" Version=\"3.1.1\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Common Migration Issues\n\n**Embedded resources:** files not in a standard location may need explicit includes:\n\n```xml\n\u003CItemGroup>\n  \u003CEmbeddedResource Include=\"..\\shared\\Schemas\\*.xsd\" LinkBase=\"Schemas\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n**Content files with CopyToOutputDirectory:** these still need explicit entries:\n\n```xml\n\u003CItemGroup>\n  \u003CContent Include=\"appsettings.json\" CopyToOutputDirectory=\"PreserveNewest\" \u002F>\n  \u003CNone Include=\"scripts\\*.sql\" CopyToOutputDirectory=\"PreserveNewest\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n**Multi-targeting:** change the element name from singular to plural:\n\n```xml\n\u003C!-- Single target -->\n\u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n\n\u003C!-- Multiple targets -->\n\u003CTargetFrameworks>net472;net8.0\u003C\u002FTargetFrameworks>\n```\n\n**WPF\u002FWinForms projects:** use the appropriate SDK or properties:\n\n```xml\n\u003C!-- Option A: WindowsDesktop SDK -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk.WindowsDesktop\">\n\n\u003C!-- Option B: properties in standard SDK (preferred for .NET 5+) -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CUseWPF>true\u003C\u002FUseWPF>\n    \u003C!-- or -->\n    \u003CUseWindowsForms>true\u003C\u002FUseWindowsForms>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n**Test projects:** use the standard SDK with test framework packages:\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n    \u003CIsPackable>false\u003C\u002FIsPackable>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"17.9.0\" \u002F>\n    \u003CPackageReference Include=\"xunit\" Version=\"2.7.0\" \u002F>\n    \u003CPackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.5.7\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Central Package Management Migration\n\nCentralizes NuGet version management across a multi-project solution. See [https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management) for details.\n\n**Step 1:** Create `Directory.Packages.props` at the repository root with `\u003CManagePackageVersionsCentrally>true\u003C\u002FManagePackageVersionsCentrally>` and `\u003CPackageVersion>` items for all packages.\n\n**Step 2:** Remove `Version` from each project's `PackageReference`:\n\n```xml\n\u003C!-- BEFORE -->\n\u003CPackageReference Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n\n\u003C!-- AFTER -->\n\u003CPackageReference Include=\"Newtonsoft.Json\" \u002F>\n```\n\n## Directory.Build Consolidation\n\nIdentify properties repeated across multiple `.csproj` files and move them to shared files.\n\n**`Directory.Build.props`** (for properties — placed at repo or src root):\n\n```xml\n\u003CProject>\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n    \u003CNullable>enable\u003C\u002FNullable>\n    \u003CImplicitUsings>enable\u003C\u002FImplicitUsings>\n    \u003CTreatWarningsAsErrors>true\u003C\u002FTreatWarningsAsErrors>\n    \u003CCompany>Contoso\u003C\u002FCompany>\n    \u003CCopyright>Copyright © Contoso 2024\u003C\u002FCopyright>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n**`Directory.Build.targets`** (for targets\u002Ftasks — placed at repo or src root):\n\n```xml\n\u003CProject>\n  \u003CTarget Name=\"PrintBuildInfo\" AfterTargets=\"Build\">\n    \u003CMessage Importance=\"High\" Text=\"Built $(AssemblyName) → $(TargetPath)\" \u002F>\n  \u003C\u002FTarget>\n\u003C\u002FProject>\n```\n\n**Keep in individual `.csproj` files** only what is project-specific:\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003COutputType>Exe\u003C\u002FOutputType>\n    \u003CAssemblyName>MyApp\u003C\u002FAssemblyName>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"Serilog\" \u002F>\n    \u003CProjectReference Include=\"..\\MyLibrary\\MyLibrary.csproj\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Tools and Automation\n\n| Tool | Usage |\n|------|-------|\n| `dotnet try-convert` | Automated legacy-to-SDK conversion. Install: `dotnet tool install -g try-convert` |\n| .NET Upgrade Assistant | Full migration including API changes. Install: `dotnet tool install -g upgrade-assistant` |\n| Visual Studio | Right-click `packages.config` → *Migrate packages.config to PackageReference* |\n| Manual migration | Often cleanest for simple projects — follow the checklist above |\n\n**Recommended approach:**\n\n1. Run `try-convert` for a first pass\n2. Review and clean up the output manually\n3. Build and fix any issues\n4. Enable modern features (nullable, implicit usings)\n5. Consolidate shared settings into `Directory.Build.props`\n","# MSBuild Modernization: Legacy to SDK-style Migration\n\n## Identifying Legacy vs SDK-style Projects\n\n**Legacy indicators:**\n\n- `\u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>`\n- Explicit file lists (`\u003CCompile Include=\"...\" \u002F>` for every `.cs` file)\n- `ToolsVersion` attribute on `\u003CProject>` element\n- `packages.config` file present\n- `Properties\\AssemblyInfo.cs` with assembly-level attributes\n\n**SDK-style indicators:**\n\n- `\u003CProject Sdk=\"Microsoft.NET.Sdk\">` attribute on root element\n- Minimal content — a simple project may be 10–15 lines\n- No explicit file includes (implicit globbing)\n- `\u003CPackageReference>` items instead of `packages.config`\n\n**Quick check:** if a `.csproj` is more than 50 lines for a simple class library or console app, it is likely legacy format.\n\n```xml\n\u003C!-- Legacy: ~80+ lines for a simple library -->\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003CProject ToolsVersion=\"15.0\" xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdeveloper\u002Fmsbuild\u002F2003\">\n  \u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" \u002F>\n  \u003CPropertyGroup>\n    \u003CConfiguration Condition=\" '$(Configuration)' == '' \">Debug\u003C\u002FConfiguration>\n    \u003CPlatform Condition=\" '$(Platform)' == '' \">AnyCPU\u003C\u002FPlatform>\n    \u003COutputType>Library\u003C\u002FOutputType>\n    \u003CRootNamespace>MyLibrary\u003C\u002FRootNamespace>\n    \u003CAssemblyName>MyLibrary\u003C\u002FAssemblyName>\n    \u003CTargetFrameworkVersion>v4.7.2\u003C\u002FTargetFrameworkVersion>\n    \u003CFileAlignment>512\u003C\u002FFileAlignment>\n    \u003CDeterministic>true\u003C\u002FDeterministic>\n  \u003C\u002FPropertyGroup>\n  \u003C!-- ... 60+ more lines ... -->\n  \u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\u003C\u002FProject>\n```\n\n```xml\n\u003C!-- SDK-style: ~8 lines for the same library -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net472\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n## Migration Checklist: Legacy → SDK-style\n\n### Step 1: Replace Project Root Element\n\n**BEFORE:**\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003CProject ToolsVersion=\"15.0\" xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdeveloper\u002Fmsbuild\u002F2003\">\n  \u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\"\n          Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" \u002F>\n  \u003C!-- ... project content ... -->\n  \u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\u003C\u002FProject>\n```\n\n**AFTER:**\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003C!-- ... project content ... -->\n\u003C\u002FProject>\n```\n\nRemove the XML declaration, `ToolsVersion`, `xmlns`, and both `\u003CImport>` lines. The `Sdk` attribute replaces all of them.\n\n### Step 2: Set TargetFramework\n\n**BEFORE:**\n\n```xml\n\u003CPropertyGroup>\n  \u003CTargetFrameworkVersion>v4.7.2\u003C\u002FTargetFrameworkVersion>\n\u003C\u002FPropertyGroup>\n```\n\n**AFTER:**\n\n```xml\n\u003CPropertyGroup>\n  \u003CTargetFramework>net472\u003C\u002FTargetFramework>\n\u003C\u002FPropertyGroup>\n```\n\n**TFM mapping table:**\n\n| Legacy `TargetFrameworkVersion` | SDK-style `TargetFramework` |\n|---------------------------------|-----------------------------|\n| `v4.6.1`                        | `net461`                    |\n| `v4.7.2`                        | `net472`                    |\n| `v4.8`                          | `net48`                     |\n| (migrating to .NET 6)           | `net6.0`                    |\n| (migrating to .NET 8)           | `net8.0`                    |\n\n### Step 3: Remove Explicit File Includes\n\n**BEFORE:**\n\n```xml\n\u003CItemGroup>\n  \u003CCompile Include=\"Controllers\\HomeController.cs\" \u002F>\n  \u003CCompile Include=\"Models\\User.cs\" \u002F>\n  \u003CCompile Include=\"Models\\Order.cs\" \u002F>\n  \u003CCompile Include=\"Services\\AuthService.cs\" \u002F>\n  \u003CCompile Include=\"Services\\OrderService.cs\" \u002F>\n  \u003CCompile Include=\"Properties\\AssemblyInfo.cs\" \u002F>\n  \u003C!-- ... 50+ more lines ... -->\n\u003C\u002FItemGroup>\n\u003CItemGroup>\n  \u003CContent Include=\"Views\\Home\\Index.cshtml\" \u002F>\n  \u003CContent Include=\"Views\\Shared\\_Layout.cshtml\" \u002F>\n  \u003C!-- ... more content files ... -->\n\u003C\u002FItemGroup>\n```\n\n**AFTER:**\n\nDelete all of these `\u003CCompile>` and `\u003CContent>` item groups entirely. SDK-style projects include them automatically via implicit globbing.\n\n**Exception:** keep explicit entries only for files that need special metadata or reside outside the project directory:\n\n```xml\n\u003CItemGroup>\n  \u003CContent Include=\"..\\shared\\config.json\" Link=\"config.json\" CopyToOutputDirectory=\"PreserveNewest\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n### Step 4: Remove AssemblyInfo.cs\n\n**BEFORE** (`Properties\\AssemblyInfo.cs`):\n\n```csharp\nusing System.Reflection;\nusing System.Runtime.InteropServices;\n\n[assembly: AssemblyTitle(\"MyLibrary\")]\n[assembly: AssemblyDescription(\"A useful library\")]\n[assembly: AssemblyCompany(\"Contoso\")]\n[assembly: AssemblyProduct(\"MyLibrary\")]\n[assembly: AssemblyCopyright(\"Copyright © Contoso 2024\")]\n[assembly: ComVisible(false)]\n[assembly: Guid(\"...\")]\n[assembly: AssemblyVersion(\"1.2.0.0\")]\n[assembly: AssemblyFileVersion(\"1.2.0.0\")]\n```\n\n**AFTER** (in `.csproj`):\n\n```xml\n\u003CPropertyGroup>\n  \u003CAssemblyTitle>MyLibrary\u003C\u002FAssemblyTitle>\n  \u003CDescription>A useful library\u003C\u002FDescription>\n  \u003CCompany>Contoso\u003C\u002FCompany>\n  \u003CProduct>MyLibrary\u003C\u002FProduct>\n  \u003CCopyright>Copyright © Contoso 2024\u003C\u002FCopyright>\n  \u003CVersion>1.2.0\u003C\u002FVersion>\n\u003C\u002FPropertyGroup>\n```\n\nDelete `Properties\\AssemblyInfo.cs` — the SDK auto-generates assembly attributes from these properties.\n\n**Alternative:** if you prefer to keep `AssemblyInfo.cs`, disable auto-generation:\n\n```xml\n\u003CPropertyGroup>\n  \u003CGenerateAssemblyInfo>false\u003C\u002FGenerateAssemblyInfo>\n\u003C\u002FPropertyGroup>\n```\n\n### Step 5: Migrate packages.config → PackageReference\n\n**BEFORE** (`packages.config`):\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003Cpackages>\n  \u003Cpackage id=\"Newtonsoft.Json\" version=\"13.0.3\" targetFramework=\"net472\" \u002F>\n  \u003Cpackage id=\"Serilog\" version=\"3.1.1\" targetFramework=\"net472\" \u002F>\n  \u003Cpackage id=\"Microsoft.Extensions.DependencyInjection\" version=\"8.0.0\" targetFramework=\"net472\" \u002F>\n\u003C\u002Fpackages>\n```\n\n**AFTER** (in `.csproj`):\n\n```xml\n\u003CItemGroup>\n  \u003CPackageReference Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n  \u003CPackageReference Include=\"Serilog\" Version=\"3.1.1\" \u002F>\n  \u003CPackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"8.0.0\" \u002F>\n\u003C\u002FItemGroup>\n```\n\nDelete `packages.config` after migration.\n\n**Migration options:**\n\n- **Visual Studio:** right-click `packages.config` → *Migrate packages.config to PackageReference*\n- **CLI:** `dotnet migrate-packages-config` or manual conversion\n- **Binding redirects:** SDK-style projects auto-generate binding redirects — remove the `\u003Cruntime>` section from `app.config` if present\n\n### Step 6: Remove Unnecessary Boilerplate\n\nDelete all of the following — the SDK provides sensible defaults:\n\n```xml\n\u003C!-- DELETE: SDK imports (replaced by Sdk attribute) -->\n\u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" ... \u002F>\n\u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\n\u003C!-- DELETE: default Configuration\u002FPlatform (SDK provides these) -->\n\u003CPropertyGroup>\n  \u003CConfiguration Condition=\" '$(Configuration)' == '' \">Debug\u003C\u002FConfiguration>\n  \u003CPlatform Condition=\" '$(Platform)' == '' \">AnyCPU\u003C\u002FPlatform>\n  \u003CProjectGuid>{...}\u003C\u002FProjectGuid>\n  \u003COutputType>Library\u003C\u002FOutputType>  \u003C!-- keep only if not Library -->\n  \u003CAppDesignerFolder>Properties\u003C\u002FAppDesignerFolder>\n  \u003CFileAlignment>512\u003C\u002FFileAlignment>\n  \u003CAutoGenerateBindingRedirects>true\u003C\u002FAutoGenerateBindingRedirects>\n  \u003CDeterministic>true\u003C\u002FDeterministic>\n\u003C\u002FPropertyGroup>\n\n\u003C!-- DELETE: standard Debug\u002FRelease configurations (SDK defaults match) -->\n\u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n  \u003CDebugSymbols>true\u003C\u002FDebugSymbols>\n  \u003CDebugType>full\u003C\u002FDebugType>\n  \u003COptimize>false\u003C\u002FOptimize>\n  \u003COutputPath>bin\\Debug\\\u003C\u002FOutputPath>\n  \u003CDefineConstants>DEBUG;TRACE\u003C\u002FDefineConstants>\n  \u003CErrorReport>prompt\u003C\u002FErrorReport>\n  \u003CWarningLevel>4\u003C\u002FWarningLevel>\n\u003C\u002FPropertyGroup>\n\u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n  \u003CDebugType>pdbonly\u003C\u002FDebugType>\n  \u003COptimize>true\u003C\u002FOptimize>\n  \u003COutputPath>bin\\Release\\\u003C\u002FOutputPath>\n  \u003CDefineConstants>TRACE\u003C\u002FDefineConstants>\n  \u003CErrorReport>prompt\u003C\u002FErrorReport>\n  \u003CWarningLevel>4\u003C\u002FWarningLevel>\n\u003C\u002FPropertyGroup>\n\n\u003C!-- DELETE: framework assembly references (implicit in SDK) -->\n\u003CItemGroup>\n  \u003CReference Include=\"System\" \u002F>\n  \u003CReference Include=\"System.Core\" \u002F>\n  \u003CReference Include=\"System.Data\" \u002F>\n  \u003CReference Include=\"System.Xml\" \u002F>\n  \u003CReference Include=\"System.Xml.Linq\" \u002F>\n  \u003CReference Include=\"Microsoft.CSharp\" \u002F>\n\u003C\u002FItemGroup>\n\n\u003C!-- DELETE: packages.config reference -->\n\u003CNone Include=\"packages.config\" \u002F>\n\n\u003C!-- DELETE: designer service entries -->\n\u003CService Include=\"{508349B6-6B84-11D3-8410-00C04F8EF8E0}\" \u002F>\n```\n\n**Keep** only properties that differ from SDK defaults (e.g., `\u003COutputType>Exe\u003C\u002FOutputType>`, `\u003CRootNamespace>` if it differs from the assembly name, custom `\u003CDefineConstants>`).\n\n### Step 7: Enable Modern Features\n\nAfter migration, consider enabling modern C# features:\n\n```xml\n\u003CPropertyGroup>\n  \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n  \u003CNullable>enable\u003C\u002FNullable>\n  \u003CImplicitUsings>enable\u003C\u002FImplicitUsings>\n\u003C\u002FPropertyGroup>\n```\n\n- `\u003CNullable>enable\u003C\u002FNullable>` — enables nullable reference type analysis\n- `\u003CImplicitUsings>enable\u003C\u002FImplicitUsings>` — auto-imports common namespaces (.NET 6+)\n- **Avoid `\u003CLangVersion>latest`** — the effective language version is determined by the SDK\u002Fcompiler defaults, not just the TFM, so builds can silently vary across machines with different SDKs installed. Omit `\u003CLangVersion>` unless you need to pin a specific version. For reproducible builds, pin the SDK version repo-wide with `global.json` (which indirectly fixes the default language version), or set an explicit numeric `\u003CLangVersion>` (e.g. `\u003CLangVersion>12\u003C\u002FLangVersion>`) per project to directly control the language version.\n\n## Complete Before\u002FAfter Example\n\n**BEFORE** (legacy — 65 lines):\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"utf-8\"?>\n\u003CProject ToolsVersion=\"15.0\" xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdeveloper\u002Fmsbuild\u002F2003\">\n  \u003CImport Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\"\n          Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" \u002F>\n  \u003CPropertyGroup>\n    \u003CConfiguration Condition=\" '$(Configuration)' == '' \">Debug\u003C\u002FConfiguration>\n    \u003CPlatform Condition=\" '$(Platform)' == '' \">AnyCPU\u003C\u002FPlatform>\n    \u003CProjectGuid>{12345678-1234-1234-1234-123456789ABC}\u003C\u002FProjectGuid>\n    \u003COutputType>Library\u003C\u002FOutputType>\n    \u003CAppDesignerFolder>Properties\u003C\u002FAppDesignerFolder>\n    \u003CRootNamespace>MyLibrary\u003C\u002FRootNamespace>\n    \u003CAssemblyName>MyLibrary\u003C\u002FAssemblyName>\n    \u003CTargetFrameworkVersion>v4.7.2\u003C\u002FTargetFrameworkVersion>\n    \u003CFileAlignment>512\u003C\u002FFileAlignment>\n    \u003CDeterministic>true\u003C\u002FDeterministic>\n  \u003C\u002FPropertyGroup>\n  \u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    \u003CDebugSymbols>true\u003C\u002FDebugSymbols>\n    \u003CDebugType>full\u003C\u002FDebugType>\n    \u003COptimize>false\u003C\u002FOptimize>\n    \u003COutputPath>bin\\Debug\\\u003C\u002FOutputPath>\n    \u003CDefineConstants>DEBUG;TRACE\u003C\u002FDefineConstants>\n    \u003CErrorReport>prompt\u003C\u002FErrorReport>\n    \u003CWarningLevel>4\u003C\u002FWarningLevel>\n  \u003C\u002FPropertyGroup>\n  \u003CPropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    \u003CDebugType>pdbonly\u003C\u002FDebugType>\n    \u003COptimize>true\u003C\u002FOptimize>\n    \u003COutputPath>bin\\Release\\\u003C\u002FOutputPath>\n    \u003CDefineConstants>TRACE\u003C\u002FDefineConstants>\n    \u003CErrorReport>prompt\u003C\u002FErrorReport>\n    \u003CWarningLevel>4\u003C\u002FWarningLevel>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CReference Include=\"System\" \u002F>\n    \u003CReference Include=\"System.Core\" \u002F>\n    \u003CReference Include=\"System.Xml.Linq\" \u002F>\n    \u003CReference Include=\"Microsoft.CSharp\" \u002F>\n  \u003C\u002FItemGroup>\n  \u003CItemGroup>\n    \u003CCompile Include=\"Models\\User.cs\" \u002F>\n    \u003CCompile Include=\"Models\\Order.cs\" \u002F>\n    \u003CCompile Include=\"Services\\UserService.cs\" \u002F>\n    \u003CCompile Include=\"Services\\OrderService.cs\" \u002F>\n    \u003CCompile Include=\"Helpers\\StringExtensions.cs\" \u002F>\n    \u003CCompile Include=\"Properties\\AssemblyInfo.cs\" \u002F>\n  \u003C\u002FItemGroup>\n  \u003CItemGroup>\n    \u003CNone Include=\"packages.config\" \u002F>\n  \u003C\u002FItemGroup>\n  \u003CImport Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" \u002F>\n\u003C\u002FProject>\n```\n\n**AFTER** (SDK-style — 11 lines):\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net472\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n    \u003CPackageReference Include=\"Serilog\" Version=\"3.1.1\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Common Migration Issues\n\n**Embedded resources:** files not in a standard location may need explicit includes:\n\n```xml\n\u003CItemGroup>\n  \u003CEmbeddedResource Include=\"..\\shared\\Schemas\\*.xsd\" LinkBase=\"Schemas\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n**Content files with CopyToOutputDirectory:** these still need explicit entries:\n\n```xml\n\u003CItemGroup>\n  \u003CContent Include=\"appsettings.json\" CopyToOutputDirectory=\"PreserveNewest\" \u002F>\n  \u003CNone Include=\"scripts\\*.sql\" CopyToOutputDirectory=\"PreserveNewest\" \u002F>\n\u003C\u002FItemGroup>\n```\n\n**Multi-targeting:** change the element name from singular to plural:\n\n```xml\n\u003C!-- Single target -->\n\u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n\n\u003C!-- Multiple targets -->\n\u003CTargetFrameworks>net472;net8.0\u003C\u002FTargetFrameworks>\n```\n\n**WPF\u002FWinForms projects:** use the appropriate SDK or properties:\n\n```xml\n\u003C!-- Option A: WindowsDesktop SDK -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk.WindowsDesktop\">\n\n\u003C!-- Option B: properties in standard SDK (preferred for .NET 5+) -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CUseWPF>true\u003C\u002FUseWPF>\n    \u003C!-- or -->\n    \u003CUseWindowsForms>true\u003C\u002FUseWindowsForms>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n**Test projects:** use the standard SDK with test framework packages:\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n    \u003CIsPackable>false\u003C\u002FIsPackable>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"17.9.0\" \u002F>\n    \u003CPackageReference Include=\"xunit\" Version=\"2.7.0\" \u002F>\n    \u003CPackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.5.7\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Central Package Management Migration\n\nCentralizes NuGet version management across a multi-project solution. See [https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management) for details.\n\n**Step 1:** Create `Directory.Packages.props` at the repository root with `\u003CManagePackageVersionsCentrally>true\u003C\u002FManagePackageVersionsCentrally>` and `\u003CPackageVersion>` items for all packages.\n\n**Step 2:** Remove `Version` from each project's `PackageReference`:\n\n```xml\n\u003C!-- BEFORE -->\n\u003CPackageReference Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n\n\u003C!-- AFTER -->\n\u003CPackageReference Include=\"Newtonsoft.Json\" \u002F>\n```\n\n## Directory.Build Consolidation\n\nIdentify properties repeated across multiple `.csproj` files and move them to shared files.\n\n**`Directory.Build.props`** (for properties — placed at repo or src root):\n\n```xml\n\u003CProject>\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net8.0\u003C\u002FTargetFramework>\n    \u003CNullable>enable\u003C\u002FNullable>\n    \u003CImplicitUsings>enable\u003C\u002FImplicitUsings>\n    \u003CTreatWarningsAsErrors>true\u003C\u002FTreatWarningsAsErrors>\n    \u003CCompany>Contoso\u003C\u002FCompany>\n    \u003CCopyright>Copyright © Contoso 2024\u003C\u002FCopyright>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n**`Directory.Build.targets`** (for targets\u002Ftasks — placed at repo or src root):\n\n```xml\n\u003CProject>\n  \u003CTarget Name=\"PrintBuildInfo\" AfterTargets=\"Build\">\n    \u003CMessage Importance=\"High\" Text=\"Built $(AssemblyName) → $(TargetPath)\" \u002F>\n  \u003C\u002FTarget>\n\u003C\u002FProject>\n```\n\n**Keep in individual `.csproj` files** only what is project-specific:\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003COutputType>Exe\u003C\u002FOutputType>\n    \u003CAssemblyName>MyApp\u003C\u002FAssemblyName>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"Serilog\" \u002F>\n    \u003CProjectReference Include=\"..\\MyLibrary\\MyLibrary.csproj\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Tools and Automation\n\n| Tool | Usage |\n|------|-------|\n| `dotnet try-convert` | Automated legacy-to-SDK conversion. Install: `dotnet tool install -g try-convert` |\n| .NET Upgrade Assistant | Full migration including API changes. Install: `dotnet tool install -g upgrade-assistant` |\n| Visual Studio | Right-click `packages.config` → *Migrate packages.config to PackageReference* |\n| Manual migration | Often cleanest for simple projects — follow the checklist above |\n\n**Recommended approach:**\n\n1. Run `try-convert` for a first pass\n2. Review and clean up the output manually\n3. Build and fix any issues\n4. Enable modern features (nullable, implicit usings)\n5. Consolidate shared settings into `Directory.Build.props`\n",{"name":5,"license":14,"description":7},"main","ccab8dffc0ecc173838f51e4c5f0d3b51a704f41","plugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fmsbuild-modernization","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills","https:\u002F\u002Fgithub.com\u002Fdeadmade","https:\u002F\u002Fdeadmade.github.io\u002F","Blood, an Ocean of blood","2026-11-14 02:03:31",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add deadmade\u002Fdead-agent-skills --skill msbuild-modernization",{"tool":37,"command":38},"bunx","bunx skills add deadmade\u002Fdead-agent-skills --skill msbuild-modernization",{"tool":40,"command":41},"pnpm","pnpm dlx skills add deadmade\u002Fdead-agent-skills --skill msbuild-modernization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fmsbuild-modernization\u002FSKILL.md",true,[],[46,53,62,70,77,84],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7CVRBFTXSTTQ7F5P6PJEFYA","rust-best-practices","Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Frust-skills\u002Fskills\u002Frust-best-practices\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":57,"licenseFileUrl":58,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7CVR0W7B8EGTNPSPA7FPC4Z","postgres-database-migration","Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases.\n\n**Trigger when user asks to:**\n- Test a schema migration before applying it to production\n- Add, remove, or rename columns safely on a live table\n- Change a column's data type without downtime\n- Add or drop indexes, constraints, or foreign keys on large tables\n- Understand which ALTER TABLE operations lock the table\n- Roll back a failed migration\n- Plan a zero-downtime migration strategy\n- Fork a database to test a migration safely\n\nCovers: lock-level reference for every common DDL operation, safe migration patterns, fork-based testing, zero-downtime column changes, index creation, constraint addition, backfill strategies, pre\u002Fpost-migration validation, and rollback planning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-database-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-database-migration\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":57,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7CVQWK20ASAZN5VETZC8J99","postgres-best-practices","Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-best-practices\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-best-practices\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7CVQ5CY7AQHY7A2Y99RE6A7","writing-mstest-tests","ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7CVPWJZ63GB0810F0SCGZ1K","winforms-expert","Create, modify, debug, or review Windows Forms applications only when the request contains a concrete Windows Forms marker. USE FOR: WinForms, Windows Forms, System.Windows.Forms, WinForms Form or UserControl designer files (*.Designer.cs or *.Designer.vb), Visual Studio WinForms Designer, TableLayoutPanel, BindingSource, DataGridView, Control.InvokeAsync, component-tray ownership, or custom control serialization. DO NOT USE FOR: WPF or WPF XAML, including Window.InputBindings, KeyBinding, commands, or DataContext; .NET MAUI; Avalonia; or any request where none of the listed Windows Forms markers is present.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fwinforms-expert\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7CVPR0QFZ1HMJ6GZRBQAQ7W","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including the generic Vector type, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fvectorization\u002FSKILL.md",[],[]]