|
|
|
|
|
by janjones
372 days ago
|
|
> Is #:package <pkg> really so much nicer than #r "nuget: <pkg>" as to deserve deviating from .NET Interactive, F# and the existing NuGet picker? (It could be, if properly argued!) Yes, we believe so. There is not much to be gained from reusing the syntax (it's not like you can import cs from csx or vice versa). We are also adding other directives, e.g., `#:property` - it would not make sense to reuse `#r` for that. `#r` is short for "reference", because it was originally meant for referencing DLLs which is discouraged in modern .NET. The main motivation for file-based programs is to lower the entry barrier, and having opaquely named directives like `#r` seems counter-productive. > On that note, is any language other than C# supported for `dotnet run`? File-based programs are for C# only. F# already has `dotnet fsi`. VB support seems unlikely per the language strategy: https://learn.microsoft.com/en-us/dotnet/fundamentals/langua... > Is the machinery at least documented for other MSBuild SDKs to use? There is really not much special machinery, an in-memory csproj file is created and built via MSBuild just like an on-disk csproj would. Any MSBuild SDK can be used via the `#:sdk` directive. |
|
You can't do much of anything in .NET without referencing Nuget assemblies.
> opaquely named directives like `#r` seems counter-productive
Then why is it the existing standard?
Agreeing with others, '#r "nuget:' should at least be an option. And otherwise (but I guess regarless if you stick with this syntax) you will have to add another tab to Nuget called "dotnet run". "Script & Interactive" is already present in Nuget and shows the #r syntax for a reference.