Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement #r "nuget:..." #5654

Open
cston opened this issue Oct 2, 2015 · 10 comments
Open

Implement #r "nuget:..." #5654

cston opened this issue Oct 2, 2015 · 10 comments

Comments

@cston
Copy link
Member

cston commented Oct 2, 2015

Implement NuGetPackageResolver.

@cston cston added this to the 1.2 milestone Oct 2, 2015
@cston
Copy link
Member Author

cston commented Oct 2, 2015

See #5653

@ctaggart
Copy link
Contributor

I essentially proposed a flavor of this in F# suggestions, but building on the awesome dotnet core nuget integration. It would seriously help with Azure Functions. I think it is time to look at this again. cc @tmat @filipw

@PawelTroka
Copy link

So this is still not done?
We really need it for F# scripting and C# scripting.

@filipw
Copy link
Contributor

filipw commented Oct 13, 2017

It's a community standalone package at the moment, you can plug it into Roslyn if you need. See Dotnet.Script.DependencyModel.NuGet here https://github.com/filipw/dotnet-script/releases/tag/0.14.0

@jinujoseph jinujoseph modified the milestones: 15.6, Unknown Nov 3, 2017
@adamralph
Copy link
Contributor

@filipw I'm looking at NuGetMetadataReferenceResolver but I can't see how it's providing NuGet references. It seems to merely wrap another resolver and when the #r starts with "nuget" it returns a reference to its own assembly, which contains no other types. What am I missing? Where is the download of the package happening?

@adamralph
Copy link
Contributor

From #5653 (comment):

...we decided to postpone NuGet support to the next release.

That comment was written in October 2015. More than two years has passed and we still don't have this, IMHO, essential feature. I see that 8 days ago, it was removed from the 15.6 milestone (I was excited to see it on that milestone) and moved to "unknown". Is there a reason this keeps getting postponed (2 years and counting). I believe the ability to reference NuGet packages is they key to truly unlock .NET scripting into being generally useful.

@daveaglick
Copy link
Contributor

I believe the ability to reference NuGet packages is they key to truly unlock .NET scripting into being generally useful.

I agree. NuGet provides an excellent extensibility model for scripting and makes bootstrapping all the requirements for a script much, much easier.

@ArgusMagnus
Copy link

Is this ever going to make into a release or was this dropped permanently?

@adamralph
Copy link
Contributor

adamralph commented Jun 10, 2020

With C# 9 removing so much boiler plate from console apps, a console app is getting much closer to resembling a "script". If we added this feature to C# proper (not just some "scripting" variant) then all that is left is to do is add defaults for a couple more properties in csproj:

  • OutputType => Exe
  • TargetFramework => the latest netcoreapp{x}.{y} or net{x}.{y} (in the case of .NET 5 and later) available

...and then, in the simple case, we can skip csproj entirely, and a console app can be a single cs file!

@MuhAssar
Copy link

MuhAssar commented Jun 10, 2020

this will be like the transition from nodejs with its package.json to deno with embedded import statements and single file executable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests