Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

dotnet-artifacts-outputdotnet 工件输出

Agent Skill

dotnet-artifacts-output 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

318

周安装

13

GitHub Stars

15

下载量

103
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dotnet-artifacts-output(dotnet 工件输出)
来源仓库:https://github.com/wshaddix/dotnet-skills
仓库路径:skills/dotnet-artifacts-output
安装命令:
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-artifacts-output
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-artifacts-output

简介

dotnet-artifacts-output 指导 .NET SDK 工件输出布局配置,将构建产物集中到 artifacts/ 目录便于管理。

  • 适合新项目初始化或需要统一构建输出路径的中大型解决方案。
  • 自动识别 .NET 8+ SDK 环境并提供标准化的发布物组织方式。
  • 使用前需运行 dotnet-version-detection 确认 SDK 版本兼容性。
  • 迁移现有项目时应评估磁盘空间和部署流程的调整成本。

SKILL.md

dotnet-artifacts-output

Reference guide for the.NET SDK artifacts output layout, which centralizes build outputs (bin/, obj/, publish/, package/) into a single artifacts/ directory at the repo root. Available since.NET 8 as an opt-in feature. Recommended for new projects; evaluate tradeoffs before migrating existing projects.

Prerequisites: Run [skill:dotnet-version-detection] first to confirm.NET 8+ SDK -- artifacts output layout is not available in earlier SDK versions.

Scope boundary: [skill:dotnet-project-structure] covers source tree organization (.sln, .csproj, src/, tests/). This skill covers build output organization (artifacts/bin/, artifacts/obj/, artifacts/publish/). Source tree vs output tree.

Cross-references: [skill:dotnet-project-structure] for solution layout, [skill:dotnet-containers] for Dockerfile path adjustments, [skill:dotnet-gha-build-test] for CI artifact upload paths, [skill:dotnet-scaffold-project] for generating new projects with artifacts output enabled.


Why Use Artifacts Output

Traditional.NET build output scatters bin/ and obj/ directories throughout the source tree, one per project. The artifacts output layout consolidates all build outputs under a single artifacts/ directory next to Directory.Build.props.

Benefits:

  • Simpler .gitignore -- one artifacts/ entry replaces per-project bin/ and obj/ entries
  • Easier clean builds -- delete one directory instead of hunting for scattered bin//obj/ folders
  • Predictable output paths -- tooling can anticipate where to find build outputs without traversing the source tree
  • Cleaner source tree -- no build artifacts mixed into project directories

Tradeoffs:

  • Breaking path assumptions -- existing CI pipelines, Dockerfiles, and tooling that reference bin/Debug/net10.0/ paths must be updated
  • IDE/tool compatibility -- some older tools may not resolve the new output paths correctly
  • Migration effort -- existing projects require updating all hardcoded output path references

Enabling Artifacts Output

Add UseArtifactsOutput to your Directory.Build.props at the repo root:

<Project>
  <PropertyGroup>
    <UseArtifactsOutput>true</UseArtifactsOutput>
  </PropertyGroup>
</Project>

Alternatively, generate a new Directory.Build.props with artifacts output pre-configured:

dotnet new buildprops --use-artifacts

This creates:

<Project>
  <PropertyGroup>
    <ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
  </PropertyGroup>
</Project>

Setting ArtifactsPath directly is equivalent to UseArtifactsOutput=true and additionally lets you customize the root directory location.


Output Path Structure

All build outputs are organized under artifacts/ with three levels: output type, project name, and pivot (configuration/TFM/RID).

artifacts/
  bin/
    MyApp/
      debug/                          # Single-targeted project
      debug_net10.0/                  # Multi-targeted project
      release_linux-x64/              # RID-specific build
    MyApp.Core/
      debug/
  obj/
    MyApp/
      debug/
  publish/
    MyApp/
      release/                        # dotnet publish output
      release_linux-x64/              # RID-specific publish
  package/
    release/                          # NuGet .nupkg files (no project subfolder)

Output Type Directories

DirectoryContentsTraditional equivalent
artifacts/bin/Compiled assemblies and dependencies<project>/bin/
artifacts/obj/Intermediate build files, generated code<project>/obj/
artifacts/publish/Published application output<project>/bin/<config>/<tfm>/publish/
artifacts/package/NuGet packages (.nupkg, .snupkg)<project>/bin/<config>/

Pivot Naming

The pivot subfolder combines configuration, TFM, and RID joined by underscores. Components that are not present are omitted:

ScenarioPivotFull path example
Single-targeted, debugdebugartifacts/bin/MyApp/debug/
Multi-targeted, debugdebug_net10.0artifacts/bin/MyApp/debug_net10.0/
Release, RID-specificrelease_linux-x64artifacts/bin/MyApp/release_linux-x64/
Package outputreleaseartifacts/package/release/

Note: artifacts/package/ omits the project name subfolder. The pivot includes only the configuration.


Customizing the Artifacts Path

Custom Root Directory

Set ArtifactsPath to change the root location:

<PropertyGroup>
  <ArtifactsPath>$(MSBuildThisFileDirectory).output</ArtifactsPath>
</PropertyGroup>

This places all build outputs under .output/ instead of artifacts/.

Custom Pivot

Customize the pivot subfolder naming with ArtifactsPivots:

<PropertyGroup>
  <ArtifactsPivots>$(ArtifactsPivots)_MyCustomPivot</ArtifactsPivots>
</PropertyGroup>

Impact on.gitignore

With artifacts output enabled, simplify .gitignore:

# Artifacts output layout (replaces per-project bin/ and obj/ entries)
artifacts/

This single entry replaces the traditional pattern:

# Traditional layout (no longer needed with artifacts output)
[Bb]in/
[Oo]bj/

If using a custom ArtifactsPath, update the .gitignore entry to match.


Impact on Dockerfiles

Multi-stage Dockerfiles that copy build output must reference the new path structure. See [skill:dotnet-containers] for full Dockerfile patterns.

Traditional paths:

COPY --from=build /app/src/MyApp/bin/Release/net10.0/publish/ .

Artifacts output paths:

COPY --from=build /app/artifacts/publish/MyApp/release/ .

Key differences in Dockerfile paths:

  • Output is under artifacts/publish/ not bin/Release/<tfm>/publish/
  • Project name becomes a subdirectory under the output type
  • Configuration pivot is lowercase (release not Release)
  • TFM is omitted from single-targeted project pivots

Impact on CI Pipelines

CI workflows that upload build artifacts or reference output paths must be updated. See [skill:dotnet-gha-build-test] for full CI workflow patterns.

GitHub Actions -- upload build output:

- name: Publish
  run: dotnet publish src/MyApp/MyApp.csproj -c Release

- name: Upload artifact
  uses: actions/upload-artifact@v4
  with:
    name: app
    path: artifacts/publish/MyApp/release/

GitHub Actions -- upload NuGet packages:

- name: Pack
  run: dotnet pack -c Release

- name: Upload packages
  uses: actions/upload-artifact@v4
  with:
    name: packages
    path: artifacts/package/release/*.nupkg

Azure DevOps -- publish artifacts:

- script: dotnet publish src/MyApp/MyApp.csproj -c Release
  displayName: 'Publish'

- task: PublishPipelineArtifact@1
  inputs:
    targetPath: 'artifacts/publish/MyApp/release/'
    artifact: 'app'

Migration Checklist

When enabling artifacts output on an existing project:

  1. Add UseArtifactsOutput to Directory.Build.props
  2. Update .gitignore -- replace [Bb]in/ and [Oo]bj/ with artifacts/
  3. Update Dockerfiles -- change all COPY --from=build paths to use artifacts/ structure
  4. Update CI pipelines -- fix artifact upload paths, test result paths, and publish paths
  5. Update local scripts -- fix any shell scripts that reference bin/ or obj/ paths
  6. Clean old output -- delete existing bin/ and obj/ directories from all projects
  7. Verify builds -- run dotnet build and dotnet publish to confirm output appears under artifacts/
  8. Verify tests -- run dotnet test to confirm test execution with new paths

Agent Gotchas

  1. Do not hardcode TFM in artifacts output paths for single-targeted projects. The pivot for single-targeted projects is just the configuration (e.g., debug), not debug_net10.0. Multi-targeted projects include the TFM in the pivot.
  2. Do not use capitalized configuration names in artifacts paths. The artifacts layout uses lowercase pivots (debug, release), not the traditional capitalized names (Debug, Release).
  3. Do not assume artifacts/package/ has a project name subfolder. Unlike bin/, obj/, and publish/, the package/ output type omits the project name level. Packages appear directly under artifacts/package/<config>/.
  4. Do not enable artifacts output without updating Dockerfiles and CI pipelines first. Path changes will break COPY --from=build directives and artifact upload steps that reference traditional bin/ paths.
  5. Do not present artifacts output as the default.NET layout. It is opt-in since.NET 8 and remains opt-in. Recommend it for new projects; for existing projects, evaluate the migration effort against the benefits.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.32%
按下载量换算37

Claude

26.82%
按下载量换算28

Cursor

17.74%
按下载量换算18

Gemini CLI

9.23%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-artifacts-output 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills