Validate NuGet package strings
m.projectRulesExist,
m.projectValuesInScope,
m.NuGetHasHTTP,
+ m.NuGetPackageStrings,
}
end
end
+ function m.NuGetPackageStrings(prj)
+ for _, package in ipairs(prj.nuget) do
+ local components = package:explode(":")
+
+ if #components ~= 2 or #components[1] == 0 or #components[2] == 0 then
+ p.error("NuGet package '%s' in project '%s' is invalid - please give packages in the format 'id:version', e.g. 'NUnit:3.6.1'", package, prj.name)
+ end
+ end
+ end
+
+
function m.uniqueProjectIds(wks)
local uuids = {}
for prj in p.workspace.eachproject(wks) do
