private static void TargetNuGet(ITaskContext context, string nugetId) { PublishNuGetPackageTask publishTask = new PublishNuGetPackageTask(nugetId, @"Flubu\Flubu.nuspec"); publishTask.ForApiKeyUseEnvironmentVariable(); publishTask.Execute(context); }
private static void TargetNuGet(ITaskContext context, string projectName) { string nuspecFileName = Path.Combine(projectName, projectName) + ".nuspec"; PublishNuGetPackageTask publishTask = new PublishNuGetPackageTask( projectName, nuspecFileName); publishTask.BasePath = Path.GetFullPath(projectName); publishTask.ForApiKeyUseEnvironmentVariable(); publishTask.Execute(context); }