microsoft / microsoft/component-detection
Add support for `dotnet run` project metadata
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 553
- Forks
- 135
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 6
Description
The .NET team is proposing a new `dotnet run file.cs` command, which allows running single C# files, without a backing project. As part of that, NuGet dependencies can be specified as comments. For example:
```
#:sdk Microsoft.NET.Sdk.Web
#:property TargetFramework net11.0
#:property LangVersion preview
#:package System.CommandLine 2.0.0-*
```
Component Detection should be able to detect and register these dependencies.
References:
- https://github.com/dotnet/sdk/blob/main/documentation/general/dotnet-run-file.md#directives-for-project-metadata
- https://github.com/dotnet/csharplang/blob/main/proposals/ignored-directives.md
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked dotnet-run-file documentation and ignored-directives proposal to understand the supported metadata and comment syntax. Trace the existing Component Detection handling for C# project dependencies, then verify that the SDK, properties, and package directives in the issue are detected and registered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100