microsoft / microsoft/MSBuildSdks

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

Offen
#653 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
C#
Sterne
508
Forks
94
Ø Merge
6 Std. 40 Min.
Gemergte PRs (30 T.)
2

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Verhalten des Microsoft.Build.NoTargets SDK rund um GetTargetPath und das manuell importierte SDK zu lesen. Lege fest, wie die minimalen Build- und Clean-Targets funktionieren sollen und wie generierte Dateien wie DLLs, PDBs und andere relative Artefakte durch den C#-Wrapper in das endgültige Ausgabeverzeichnis von FooApp weitergegeben werden. Als erledigt gilt, wenn ein externes Rust-, Zig- oder ähnliches Tool Artefakte erstellen und bereinigen kann, während referenzierte Projekte sie transitiv kopieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, rust
Bereich
build-system
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.