component-detection
component-detection copied to clipboard
Add support for `dotnet run` project metadata
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