dotnet-script icon indicating copy to clipboard operation
dotnet-script copied to clipboard

Prerelease nuget packages

Open b0urb4k1 opened this issue 7 years ago • 7 comments

The NugetReferenceResolver only resolves normal packages but not prerelease packages.

https://github.com/filipw/dotnet-script/blob/master/src/Dotnet.Script.DependencyModel.Nuget/NuGetSourceReferenceResolver.cs#L18

b0urb4k1 avatar Jan 08 '19 15:01 b0urb4k1

So it works at runtime, but you don't get intellisense correctly, right?

filipw avatar Jan 09 '19 07:01 filipw

Intellisense seems to work but caching the package does not work and you get the message that you have to pin the version.

b0urb4k1 avatar Jan 09 '19 07:01 b0urb4k1

This should use the same regex as

https://github.com/filipw/dotnet-script/blob/cf01f703499220b3bc48ef329d3458dccb4af40f/src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs#L67-L74

seesharper avatar Jan 15 '19 22:01 seesharper

@b0urb4k1 Could you give an example of a preview package that does not get cached?

seesharper avatar Jun 22 '19 10:06 seesharper

Here is an example. Octokit.GraphQL. #r "nuget: Octokit.GraphQL, 0.1.4-beta"

https://www.nuget.org/packages/Octokit.GraphQL/0.1.4-beta

warn: Dotnet.Script.Core.Commands.ExecuteScriptCommand[0]
      The script /.../github-create-release.csx is not cacheable. For caching and optimal performance, ensure that the script only contains NuGet references with pinned/exact versions.
warn: Dotnet.Script.DependencyModel.Context.CachedRestorer[0]
      Unable to cache /tmp/scripts/.../netcoreapp3.1/script.csproj. For caching and optimal performance, ensure that the script(s) references Nuget packages with a pinned version.

Seems similar to #477

jbtule avatar Dec 09 '19 18:12 jbtule

Another Example...

Microsoft.Data.SqlClient 2.0.0-preview3.20122.2:

#r "nuget: Microsoft.Data.SqlClient,2.0.0-preview3.20122.2"

Returns:

warn: Dotnet.Script.Core.Commands.ExecuteScriptCommand[0]
      The script C:\repos\code\sql-search\sqlsearch.csx is not cacheable. For caching and optimal performance, ensure that the script only contains NuGet references with pinned/exact versions.  
warn: Dotnet.Script.DependencyModel.Context.CachedRestorer[0]
      Unable to cache C:\Users\kylemit\AppData\Local\Temp\dotnet-script\C\repos\code\sql-search\netcoreapp3.1\script.csproj. For caching and optimal performance, ensure that the script(s) 
references Nuget packages with a pinned version.

KyleMit avatar May 19 '20 22:05 KyleMit

@filipw Thanks for merging #544. I guess we can consider this closed via de064b95e1a275625b172b23049d79bd16f7fa6c?

atifaziz avatar Jun 05 '20 07:06 atifaziz