Agent Skillsmanagedcode/dotnet-skills › project-setup

project-setup

GitHub

用于创建或重构 .NET 解决方案,建立清晰的项目边界、共享构建配置及 CI/测试基线。触发场景包括新建项目、重组现有结构、设置 Directory.Build.props 等。

catalog/Platform/Project-Setup/skills/project-setup/SKILL.md managedcode/dotnet-skills

Trigger Scenarios

创建新的 .NET 解决方案 重构现有 .NET 项目结构 设置 Directory.Build.props 或共享包管理

Install

npx skills add managedcode/dotnet-skills --skill project-setup -g -y
More Options

Non-standard path

npx skills add https://github.com/managedcode/dotnet-skills/tree/main/catalog/Platform/Project-Setup/skills/project-setup -g -y

Use without installing

npx skills use managedcode/dotnet-skills@project-setup

指定 Agent (Claude Code)

npx skills add managedcode/dotnet-skills --skill project-setup -a claude-code -g -y

安装 repo 全部 skill

npx skills add managedcode/dotnet-skills --all -g -y

预览 repo 内 skill

npx skills add managedcode/dotnet-skills --list

SKILL.md

Frontmatter
{
    "name": "project-setup",
    "description": "Create or reorganize .NET solutions with clean project boundaries, repeatable SDK settings, and a maintainable baseline for libraries, apps, tests, CI, and local development. USE FOR: creating a new .NET solution or restructuring an existing one; setting up Directory.Build.props, shared package management, or repo-wide defaults; defining project. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.",
    "compatibility": "Best for new repositories or structural refactors of existing .NET solutions."
}

.NET Project Setup

Trigger On

  • creating a new .NET solution or restructuring an existing one
  • setting up Directory.Build.props, shared package management, or repo-wide defaults
  • defining project layout for apps, libraries, and test projects

Workflow

  1. Start from the app model and deployment target, then choose the smallest correct SDK and target framework set.
  2. Use solution folders and project names that reflect bounded contexts or product areas, not temporary implementation details.
  3. Centralize shared build settings, analyzer rules, nullable context, and package versions where it reduces duplication without hiding important differences.
  4. Create test projects and CI hooks early so new projects do not drift into unverified templates.
  5. Prefer project references and composition over circular dependencies or utility dumping grounds.
  6. Document the local build, test, and run path in repo docs or AGENTS.md when the workflow is not obvious.

Current Upstream Notes

  • The August 2026 "Build apps with .NET" Learn overview reinforces app-model-first setup: console, web, worker, desktop, mobile, cloud, and AI entry points should drive SDK/template choice.
  • .NET SDK 10.0.400 is the current 10.0.4xx feature band. It expands file-based app support, adds Microsoft.Testing.Platform --project and --solution selection to dotnet test, accepts @ as the dotnet new option separator, and fixes hardlink and incremental-build paths. Keep global.json, workloads, and CI images explicit for the selected feature band.

Deliver

  • a coherent solution structure
  • shared build defaults that are easy to reason about
  • starter quality and testing hooks for future work

Validate

  • projects have explicit responsibility boundaries
  • shared MSBuild settings do not accidentally override platform-specific needs
  • a new contributor can build and test the repo without guessing

References

  • patterns.md: solution layout conventions, Directory.Build.props, Directory.Build.targets, Central Package Management, global.json, nuget.config, analyzers, multi-targeting, and source link
  • templates.md: dotnet new templates for console apps, class libraries, ASP.NET Core APIs, worker services, Blazor, test projects, .NET Aspire, and gRPC services

Version History

  • 0559476 Current 2026-08-19 23:35

    更新上游笔记至 August 2026,SDK 版本升级至 10.0.400,新增 dotnet test 选择参数及 @ 分隔符支持。

  • 7ab7f03 2026-07-25 05:25

Same Skill Collection

catalog/Frameworks/gRPC/skills/grpc/SKILL.md
catalog/Frameworks/Official-Astro/skills/astro-developer/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/configuring-opentelemetry-dotnet/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/dotnet-webapi/SKILL.md
catalog/Frameworks/Official-DotNet-ASPNetCore/skills/minimal-api-file-upload/SKILL.md
catalog/Frameworks/Orleans/skills/orleans/SKILL.md
catalog/Frameworks/ThreeJS-WebGPU-TSL/skills/webgpu-threejs-tsl/SKILL.md
catalog/Libraries/Official-DotNet-Data/skills/optimizing-ef-core-queries/SKILL.md
catalog/Platform/Official-DotNet-Advanced/skills/csharp-scripts/SKILL.md
catalog/Platform/Official-DotNet-Advanced/skills/nuget-trusted-publishing/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/create-blazor-project/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/fetch-and-send-data/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/support-prerendering/SKILL.md
catalog/Platform/Official-DotNet-Blazor/skills/use-js-interop/SKILL.md
catalog/Platform/Official-DotNet-Experimental/skills/exp-mock-usage-analysis/SKILL.md
catalog/Platform/Official-DotNet-Experimental/skills/exp-simd-vectorization/SKILL.md
catalog/Platform/Official-DotNet-Test-Migration/skills/migrate-xunit-to-mstest/SKILL.md
catalog/Platform/Official-DotNet-Test-Migration/skills/migrate-xunit-to-xunit-v3/SKILL.md
catalog/Platform/Official-DotNet-Upgrade/skills/dotnet-aot-compat/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/code-testing-extensions/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/filter-syntax/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/find-untested-sources/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/platform-detection/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/scaffold-dotnet-test-project/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/test-gap-analysis/SKILL.md
catalog/Testing/Official-DotNet-Test/skills/testability-obstacle/SKILL.md
catalog/Testing/Playwright/skills/playwright-visual-testing/SKILL.md
catalog/Testing/xUnit/skills/xunit/SKILL.md
catalog/Tools/Code-Analysis/skills/code-analysis/SKILL.md
catalog/Tools/HTMLHint/skills/htmlhint/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/analyzing-dotnet-performance/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/clr-activation-debugging/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/dotnet-trace-collect/SKILL.md
catalog/Tools/Official-DotNet-Diagnostics/skills/dump-collect/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/binlog-failure-analysis/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/copy-to-output-directory/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/msbuild-server/SKILL.md
catalog/Tools/Official-DotNet-MSBuild/skills/resolve-project-references/SKILL.md
catalog/Tools/ReportGenerator/skills/reportgenerator/SKILL.md
catalog/Tools/ReSharper-CLT/skills/resharper-clt/SKILL.md
catalog/Tools/Roslynator/skills/roslynator/SKILL.md
catalog/Tools/Stylelint/skills/stylelint/SKILL.md
external-sources/upstreams/webgpu-claude-skill/skills/webgpu-threejs-tsl/SKILL.md
catalog/Frameworks/ASP.NET-Core/skills/aspnet-core/SKILL.md
catalog/Frameworks/Aspire/skills/aspire/SKILL.md
catalog/Frameworks/Azure-Functions/skills/azure-functions/SKILL.md
catalog/Frameworks/Blazor/skills/blazor/SKILL.md
catalog/Frameworks/Entity-Framework-6/skills/entity-framework6/SKILL.md
catalog/Frameworks/Entity-Framework-Core/skills/entity-framework-core/SKILL.md
catalog/Frameworks/MAUI/skills/maui/SKILL.md

Metadata

Files
0
Version
0559476
Hash
45b1f607
Indexed
2026-07-25 05:25

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 21:31
浙ICP备14020137号-1 $お客様$