[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75N61D233BMB3XPY8CVZRAK":3,"skill-same:01M75N61D233BMB3XPY8CVZRAK":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75N61D233BMB3XPY8CVZRAK","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.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmsbuild-modernization\u002FSKILL.md",[],[],"2026-11-12 13:55:43",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":15,"description":7},"master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fmsbuild-modernization",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add stanfish06\u002Fskillquarium --skill msbuild-modernization",{"tool":38,"command":39},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill msbuild-modernization",{"tool":41,"command":42},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill msbuild-modernization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fmsbuild-modernization\u002FSKILL.md",true,[],[47,54,63,70,77,84],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","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\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]