Skip to content

Commit 8112399

Browse files
committed
Do not check for updates if libman.json file is missing
Check the libman.json file exists before checking for updates. Fixes error logged due to a null filename being used for the libman.json file when checking for updates. Could not get Library Manager updates for '' System.ArgumentNullException: Value cannot be null. (Parameter 'key') at System.Collections.Generic.Dictionary`2.FindValue(TKey key) at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key) at Microsoft.Web.LibraryManager.Vsix.Contracts.DependenciesFactory.FromConfigFile(String configFilePath) at MonoDevelop.LibraryManager.Updates.UpdatedLibrariesService.GetUpdatesAsync(FilePath configFilePath, CancellationToken cancellationToken) at MonoDevelop.LibraryManager.Updates.UpdatedLibrariesService.SafeGetUpdatesAsync(FilePath configFilePath, CancellationToken cancellationToken)
1 parent e00a2ac commit 8112399

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/MonoDevelop.LibraryManager/Updates/UpdatedLibrariesService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ async Task CheckForUpdatesInternalAsync(Solution solution, CancellationToken can
8383
}
8484

8585
FilePath manifestFileName = project.GetManifestFileName();
86+
if (manifestFileName.IsNull)
87+
{
88+
continue;
89+
}
8690

8791
List<UpdatedLibraryInfo> manifestUpdates = await SafeGetUpdatesAsync(
8892
manifestFileName,

0 commit comments

Comments
 (0)