NetCoreForce.Client 6.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package NetCoreForce.Client --version 6.0.0
                    
NuGet\Install-Package NetCoreForce.Client -Version 6.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetCoreForce.Client" Version="6.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetCoreForce.Client" Version="6.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NetCoreForce.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NetCoreForce.Client --version 6.0.0
                    
#r "nuget: NetCoreForce.Client, 6.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NetCoreForce.Client@6.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NetCoreForce.Client&version=6.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NetCoreForce.Client&version=6.0.0
                    
Install as a Cake Tool

NetCoreForce.Client

NetCoreForce.Client is a Salesforce REST API client library for .NET and C#, for querying, creating, updating and deleting Salesforce records from .NET 8-10, .NET Standard and .NET Framework applications.

Documentation: https://netcoreforce.com/

Install

dotnet add package NetCoreForce.Client

Optional companion packages:

Quick Start

// Log in with the OAuth Client Credentials flow
ForceClient client = await ForceClient.FromClientCredentialsAsync(
    "your-client-id", "your-client-secret", "https://your-domain.my.salesforce.com/services/oauth2/token");

// Query records
List<SfAccount> accounts = await client.Query<SfAccount>("SELECT Id, Name FROM Account LIMIT 10");

// Create, update and delete
CreateResponse created = await client.CreateRecord<SfAccount>(SfAccount.SObjectTypeName, new SfAccount { Name = "Acme" });
await client.UpdateRecord<SfAccount>(SfAccount.SObjectTypeName, created.Id, new SfAccount { Description = "Updated" });
await client.DeleteRecord(SfAccount.SObjectTypeName, created.Id);

Other login flows (Web Server, refresh token, existing access token) are covered in the Authentication docs. For more usage examples, see the Examples.

Features

  • OAuth 2.0 login: Client Credentials, Web Server (authorization code), refresh token, Username-Password, and token introspection
  • Create, read, update, delete and upsert by external ID
  • SOQL queries, including streaming large result sets with QueryAsync (IAsyncEnumerable)
  • SOSL search
  • Multiple records per request: sObject Tree, sObject Collections, and composite requests
  • Blob/file downloads, custom Apex REST endpoints, and object metadata (describe), limits and API versions
  • SoqlHelpers for safely escaping untrusted values in SOQL and SOSL queries

Target Frameworks

  • .NET Standard 2.0 and 2.1
  • .NET 8.0, 9.0 and 10.0
  • .NET Framework 4.6.2, 4.7.2, 4.8 and 4.8.1

Tested on .NET 8.0 - 10.0, with partial testing on .NET Framework.

What's New in v6

  • Added .NET 10.0 and .NET Framework 4.8.1 targets, and removed .NET Core 3.1 and .NET 5.0 - 7.0 targets
  • Added Client Credentials login via ForceClient.FromClientCredentialsAsync
  • Record IDs and object/field names are validated to prevent URL path injection
  • Added SoqlHelpers for escaping values in SOQL and SOSL queries
  • Default Salesforce API version is now v67.0

See the CHANGELOG for full details, including breaking changes.

Licensed under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on NetCoreForce.Client:

Package Downloads
NetCoreForce.Models

Strongly typed C# models for standard Salesforce objects (Account, Contact, Opportunity, Case and more) for use with NetCoreForce.Client.

CometD.NetCore.Salesforce

Event Bus for Salesforce Platform events.

NetCoreForce.Linq

A .NET Standard and .NET Core Salesforce Linq query writer

Perigee

The Best “Enterprise Integration Platform” without restrictions. Perigee works with leading enterprise architectures and distributed message systems to allow for transactionally managed integrations. Whether you’re a small shop with data critical needs or a fortune 500 with an expansive network of microservices, we’re here to help.

Weikio.ApiFramework.Plugins.Salesforce

Salesforce plugin for Api Framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.1.0 275 10/7/2026
6.0.0 217 10/6/2026
5.0.0 501,982 6/22/2025
5.0.0-Beta 1,187 2/24/2025
4.1.0 454,117 5/24/2024
4.1.0-Beta 3,398 3/29/2024
4.0.0 245,675 6/6/2023
4.0.0-beta 1,489 1/24/2023
3.1.0 494,733 1/13/2022
3.0.1 136,474 5/7/2021
3.0.0 687,998 2/11/2021
3.0.0-Beta2 1,477 1/28/2021
3.0.0-Beta 1,207 1/27/2021
2.7.0 3,570 1/4/2021
2.6.0 232,090 12/17/2019
2.5.0 228,709 11/25/2018
2.4.0 6,196 10/9/2018
2.3.0 5,266 9/18/2018
2.2.0 12,527 4/17/2018
2.1.0 4,127 3/9/2018
Loading failed

v6.0.0 adds .NET 10 and Client Credentials login, and removes EOL .NET Core 3.1 - 7.0 targets. See the CHANGELOG for full details and breaking changes: https://github.com/anthonyreilly/NetCoreForce/blob/main/CHANGELOG.md