component-detection icon indicating copy to clipboard operation
component-detection copied to clipboard

Add support for `dotnet run` project metadata

Open JamieMagee opened this issue 10 months ago • 0 comments

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

JamieMagee avatar Apr 14 '25 18:04 JamieMagee