microsoft / microsoft/MSBuildSdks
Simple SDK for custom artifacts (EXEs / DLLs) generated by external tool
Personne n'a encore pris cette issue.
- Langage dominant
- C#
- Étoiles
- 508
- Forks
- 94
- Merge moyen
- 6 h 40 min
- PR mergées (30 j)
- 2
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par lire le comportement du SDK Microsoft.Build.NoTargets autour de GetTargetPath et du SDK importé manuellement. Définissez comment les targets minimaux Build et Clean doivent fonctionner et comment les fichiers générés, tels que les DLLs, les PDBs et autres artefacts relatifs, se propagent via le wrapper C# jusqu’au répertoire de sortie final de FooApp. Le travail est terminé lorsqu’un outil externe Rust, Zig ou similaire peut générer et nettoyer les artefacts, tandis que les projets référencés les copient de manière transitive.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp, rust
- Domaine
- build-system
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100