Skip to content

Add support for #r "nuget: xxx" to run-file for ease of code transfer from csx #49199

@DamianEdwards

Description

@DamianEdwards

.csx files and .NET Interactive today support the #r syntax for adding various types of references to the current compilation scope. Run-file introduces new specific directives for referencing packages and SDKs and purposely does not want to support referencing loose assemblies or projects at this time. However, for convenience's sake we should consider supporting #r "nuget:PackageId,1.1.1" in file-based apps as an alias for #:package [email protected].

In addition, we should provide a code fix that allows easily converting an #r "nuget: xxx" directive to the equivalent #:package xxx directive. We could also consider whether the #r syntax should produce a warning diagnostic by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-run-fileItems related to the "dotnet run <file>" effortuntriagedRequest triage from a team member

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions