-
Notifications
You must be signed in to change notification settings - Fork 365
NuGet v3
Glenn Block edited this page Feb 25, 2017
·
4 revisions
NuGet 3.x installs a NuGet.config file containing something like:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json"
protocolVersion="3" />
</packageSources>
<activePackageSource>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</activePackageSource>
<disabledPackageSources />
</configuration>scriptcs uses the NuGet.Core 2.x package and that ignores the nuget.org entry due to protocolVersion="3".
As a workaround, you can add an extra package source for nuget.org v2, e.g.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json"
protocolVersion="3" />
<add key="nuget.org v2" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</activePackageSource>
<disabledPackageSources />
</configuration>You can also do this via the NuGet CLI:
nuget sources add -Name "nuget.org v2" -Source "https://www.nuget.org/api/v2/"
Alternatively you could add a file to your working directory named scriptcs_nuget.config, containing:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org v2" value="https://www.nuget.org/api/v2/" />
</packageSources>
</configuration>- Home
- Build scriptcs
- Building on Mac and Linux
- Using scriptcs
- The command line
- Package installation
- Writing a script
- Compiling (and caching) to a .dll
- Debugging a script
- REPL
- Running scripts in Atom
- REPL
- Script Packs
- Script Libraries
- Modules
- Hosting
- Community
- Known Issues