microsoft / microsoft/MSBuildSdks

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

Aperta
#653 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
508
Fork
94
Merge medio
6h 40m
PR unite (30g)
2

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo il comportamento dell’SDK Microsoft.Build.NoTargets relativo a GetTargetPath e all’SDK importato manualmente. Definisci come devono funzionare i target minimi Build e Clean e come i file generati, come DLLs, PDBs e altri artefatti relativi, vengano propagati attraverso il wrapper C# fino alla directory di output finale di FooApp. Il lavoro è completato quando uno strumento esterno Rust, Zig o simile può compilare e pulire gli artefatti, mentre i progetti referenziati li copiano transitivamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, rust
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.