PlanSolve 0.27.0
dotnet add package PlanSolve --version 0.27.0
NuGet\Install-Package PlanSolve -Version 0.27.0
<PackageReference Include="PlanSolve" Version="0.27.0" />
<PackageVersion Include="PlanSolve" Version="0.27.0" />
<PackageReference Include="PlanSolve" />
paket add PlanSolve --version 0.27.0
#r "nuget: PlanSolve, 0.27.0"
#:package PlanSolve@0.27.0
#addin nuget:?package=PlanSolve&version=0.27.0
#tool nuget:?package=PlanSolve&version=0.27.0
PlanSolve for .NET
Official .NET client for the PlanSolve optimization API. One typed client covers three solvers — field service routing, professional-services task assignment, and shift scheduling — with async/await, built-in polling, and clean error messages.
Installation
dotnet add package PlanSolve
Targets .NET 10.
Quick start
using PlanSolve;
using PlanSolve.FieldService;
using var client = new PlanSolveClient("YOUR_API_KEY");
var request = new FieldServiceStartRequest
{
Vehicles =
{
new Vehicle
{
Id = "tech1",
Location = [40.7128, -74.0060],
Skills = ["repair"],
Shifts = [new Shift(DateTime.Parse("2026-04-02T08:00:00"), DateTime.Parse("2026-04-02T17:00:00"))],
},
},
Visits =
{
new Visit
{
Id = "visit1",
Name = "AC Repair - Downtown Office",
Location = [40.7589, -73.9851],
ServiceDuration = Duration.FromMinutes(60),
Priority = "HIGH",
RequiredSkills = ["repair"],
},
},
};
// Submit and await the optimized plan in a single call
var result = await client.FieldService.StartAndWaitForCompletionAsync(request);
foreach (var vehicle in result.Vehicles)
Console.WriteLine($"Vehicle {vehicle.Id}: {vehicle.Visits.Count} visits");
Solvers
One client, three solvers — all share the same submit → poll → result workflow:
| Solver | Accessor | Use for |
|---|---|---|
| Field Service | client.FieldService |
Vehicle routing with travel time, time windows, and skills |
| Professional Services | client.ProfessionalServices |
Task assignment by skill, availability, priority, and deadlines |
| Shift | client.Shift |
Shift scheduling across contracts, availability, and fairness |
Each accessor exposes StartAsync, GetStatusAsync, GetResultAsync, GetAnalysisAsync, WaitForCompletionAsync, and StartAndWaitForCompletionAsync.
Configuration
Pass your API key to the constructor: new PlanSolveClient("...") (an overload accepts a custom HttpClient). It is sent as the X-API-KEY header on every request. PlanSolveClient is IDisposable — wrap it in using.
Error handling
API errors throw HttpRequestException (with .StatusCode populated) and a readable message (e.g. Request failed with status code 400 (BadRequest): vehicles: At least one vehicle is required.):
try
{
var result = await client.FieldService.StartAndWaitForCompletionAsync(request);
}
catch (HttpRequestException e)
{
Console.WriteLine(e.Message);
}
Documentation
Full guides, per-solver data models, and parameter reference live on the docs site:
- Field Service — https://getplansolve.com/docs/fieldservice/sdk/dotnet
- Professional Services — https://getplansolve.com/docs/professionalservices/sdk/dotnet
- Shift — https://getplansolve.com/docs/shiftsolver/sdk/dotnet
Package: NuGet
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Polly (>= 8.6.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.