Prerelease nuget packages
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
So it works at runtime, but you don't get intellisense correctly, right?
Intellisense seems to work but caching the package does not work and you get the message that you have to pin the version.
This should use the same regex as
https://github.com/filipw/dotnet-script/blob/cf01f703499220b3bc48ef329d3458dccb4af40f/src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs#L67-L74
@b0urb4k1 Could you give an example of a preview package that does not get cached?
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
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.
@filipw Thanks for merging #544. I guess we can consider this closed via de064b95e1a275625b172b23049d79bd16f7fa6c?