Check arguments count.

This commit is contained in:
Gandifil 2023-12-20 23:25:54 +03:00
parent 4e316065c0
commit a080844ddf

View file

@ -47,6 +47,10 @@ public static class Program {
var referencesVersions = config.References.ToDictionary(x => x, x => (string)null, StringComparer.OrdinalIgnoreCase); var referencesVersions = config.References.ToDictionary(x => x, x => (string)null, StringComparer.OrdinalIgnoreCase);
if (config.References.Length > 0) if (config.References.Length > 0)
{ {
if (args.Length < 2) {
Console.WriteLine("Please specify the full path of project file, you want to use");
return;
}
var csprojPath = args[1]; var csprojPath = args[1];
Console.WriteLine($"Using project file {csprojPath}"); Console.WriteLine($"Using project file {csprojPath}");
var projectRootElement = ProjectRootElement.Open(csprojPath); var projectRootElement = ProjectRootElement.Open(csprojPath);