-
Notifications
You must be signed in to change notification settings - Fork 161
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
Error on running script (unable to restore packages) #593
Comments
did you try running with --no-cache? also it might be good to try uninstalling the tool and reinstalling again |
Thank you for your reply. $ dotnet script --no-cache hoge.csx
Unable to restore packages from '/home/myuser/.cache/dotnet-script/home/myuser/net5.0/script.csproj'
Make sure that all script files contains valid NuGet references
Details:
/home/myuser/.cache/dotnet-script/home/myuser/net5.0 : dotnet restore "/home/myuser/.cache/dotnet-script/home/myuser/net5.0/script.csproj" -r linux-x64 --configfile "/home/myuser/.nuget/NuGet/NuGet.Config"
$ dotnet tool uninstall -g dotnet-script
Tool 'dotnet-script' (version '1.0.1') was successfully uninstalled.
$ dotnet tool install -g dotnet-script
You can invoke the tool using the following command: dotnet-script
Tool 'dotnet-script' (version '1.0.1') was successfully installed.
$ dotnet script --no-cache hoge.csx
Unable to restore packages from '/home/myuser/.cache/dotnet-script/home/myuser/net5.0/script.csproj'
Make sure that all script files contains valid NuGet references
Details:
/home/myuser/.cache/dotnet-script/home/myuser/net5.0 : dotnet restore "/home/myuser/.cache/dotnet-script/home/myuser/net5.0/script.csproj" -r linux-x64 --configfile "/home/myuser/.nuget/NuGet/NuGet.Config" |
Hmm I don't know why but I was able to run scripts after reinstalling .NET via |
Problem
When I run a script file with the following command I get an error as shown below:
The content of the script is as follows:
Environment Info
I am wondering if upgrading .NET Core from 3.x to 5.x and dotnet-script from 0.50.1 to 1.0.1 is somewhat related.
#199 seems relevant but what is different from the issue is that I do not import any packages.
The text was updated successfully, but these errors were encountered: