microsoft / microsoft/MSBuildSdks

Simple SDK for custom artifacts (EXEs / DLLs) generated by external tool

未关闭
#653 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C#
星标
508
派生
94
平均合并
6 小时 40 分钟
30 天内合并 PR
2

描述

I'm trying to use the Microsoft.Build.NoTargets SDK to generate a project that builds a Rust cdylib (.dll / .so) and produces the following artifacts:

  • foo.dll
  • foo.pdb
  • ...

What I'd like is to have a way to specify all of this in the most elegant way (not just tied to Rust) but the Microsoft.Build.NoTargets SDK explicitly disables the GetTargetPath target (and other stuff) and it makes you import the SDK manually (instead of just using <Project Sdk="...">) because it's intended to be a way to just launch some tools that produce no artifacts / assemblies.

So it would be nice to have a minimal SDK that just invokes two main targets (Build and Clean) and a target that allows specifying which generated files are to be copied transitively (with a folder structure relative from the build directory, like BUILD/res/foo.bin).

My concrete goal is to have a Rust (or Zig / whatever) native DLL project (libfoo-rs) that is referenced by a C# wrapper project (LibFoo) that gets used by a C# Exe project (FooApp) such that when running FooApp in VS, everything gets copied in the final Output directory.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先阅读 Microsoft.Build.NoTargets SDK 围绕 GetTargetPath 以及手动导入的 SDK 的行为。定义最小的 Build 和 Clean targets 应如何工作,以及 DLLs、PDBs 和其他相对构件等生成文件如何通过 C# wrapper 传播到 FooApp 的最终输出目录。完成的标准是,外部的 Rust、Zig 或类似工具可以构建和清理构件,同时被引用的项目会传递性地复制这些构件。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp, rust
领域
build-system
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。