OFFICIUM INSERVIO
Your reliable partner for your business software...
NuGet Fehler / NuGet errors
(alle Versionen/all versions)
Sonntag, 20. November 2022
Ursache und mögliche Lösungen
NuGet config Beispiel/NuGet config example
Ursache und mögliche Lösungen
NuGet config Beispiel/NuGet config example
Deutsch
Fehlermeldung/Situation
Fehlermeldung z.B. beim Versuch, ein "NuGet"-Paket hinzuzufügen.
Exception 'System.AggregateException'
'... (package source) ...'.
Please verify all your online package sources are available.Ursache und mögliche Lösungen
Prüfen, ob die in der Fehlermeldung genannte Paket-Quelle verfügbar ist
Wenn es eine lokale Paket-Quelle ist:
Pfad überprüfen!
Wenn es eine externe Paket-Quelle im Internet ist:
Sichergehen, dass eine Internet-Verbindung besteht und testweise versuchen, das Paket direkt über die "NuGet"-Url herunterzuladen.
Paket nach lokal kopieren und manuell aus Paket-Quelle über "NuGet"-Konsole installieren
Paket-Quellen verwalten:
In Visual Studio über "Tools" → "Optionen" → "NuGet Package Manager" kann man die Paket-Quellen einsehen.
Dort kann man auch einzelne Paket-Quellen kurzzeitig auf andere Pfade umlegen oder ganz deaktivieren.
In folgendem Pfad kann man auch direkt auf die "NuGet.Config"-Datei zugreifen:
%AppData%\NuGet\NuGet.ConfigPaket manuell installieren
Über die "NuGet"-Console (Package Manager Console) kann man Pakete auch per Kommandozeile verwalten.
Install-Package MyPackageName MyVisualStudioTargetProject -Source c:\TODO_MyOwnNuGetSources\Siehe auch
https://www.officium-inservio.com/ms-net-1/nugetcommands
English
Error message/situation
Error message e.g. when trying to add a "NuGet" package.
Exception 'System.AggregateException'
'... (package source) ...'.
Please verify all your online package sources are available.Reason and possible solutions
Check whether the package source mentioned in the error message is available
If it's a local package source:
Check the path!
If it is an external package source on the Internet:
Ensure you have an internet connection and try downloading the package directly from the "NuGet" URL as a test.
Copy package to local and install manually from package source via "NuGet" console
Manage package sources:
You can view the package sources in Visual Studio via "Tools" → "Options" → "NuGet Package Manager".
There you can also move individual package sources to other paths for a short time or disable them completely.
You can also access the "NuGet.Config" file directly in the following path:
%AppData%\NuGet\NuGet.ConfigInstall package manually
The "NuGet" console (Package Manager Console) can also be used to manage packages via the command line.
Install-Package MyPackageName MyVisualStudioTargetProject -Source c:\TODO_MyOwnNuGetSources\See also
https://www.officium-inservio.com/ms-net-1/nugetcommands
NuGet config Beispiel/NuGet config example
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="c:\TODO_MyOwnNuGetRepository\" />
</config>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<apikeys>
</apikeys>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="TODO your own source" value="c:\TODO_MyOwnNuGetSources\" />
<add key="DevExpress 22.2 Local" value="C:\Program Files (x86)\DevExpress 22.2\Components\System\Components\Packages" />
<add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\" />
</packageSources>
<disabledPackageSources>
<add key="nuget.org" value="true" />
</disabledPackageSources>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
</configuration>
