Salesforce provides programmatic access to your organization’s information using simple, powerful, and secure application programming interfaces (APIs). APIs open up a platform to developers and enable them to explore different ways to integrate platform capabilities within their own applications.

To simplify the life of the developer, many APIs are accompanied by software development kits (commonly called SDKs) and toolkits that provide libraries and resources for interacting with the API. Some good examples for Salesforce are the Salesforce Mobile SDK (for Native, Hybrid, and HTML5) and the Force.com JavaScript REST Toolkit. These resources make it easier for developers take advantage of the platform APIs.

Until recently, all that was available to developers using the Microsoft .NET Framework – and consequently building applications for Windows, Windows Phone, and even Silverlight – were the APIs themselves. We love .NET developers (I’m one myself), and there is a large constituent of .NET developers within the Salesforce community. That’s why we’re proud to announce that last week we released the Salesforce Toolkits for .NET, specifically targeting the Force.com REST APIs and the Chatter APIs.

The Salesforce Toolkits for .NET provide native libraries for interacting with Salesforce APIs, including the REST API and Chatter API. These toolkits make it super simple to consume services from Salesforce within .NET applications by packaging them up as NuGet packages, thus handling deployment and versioning. These toolkits give .NET developers the ability to take their expertise and skills and apply it to a whole new set of applications that are built on Salesforce while also letting them integrate Salesforce better into their existing applications.

The toolkit is comprised of the following:

  • A set of native libraries for the Microsoft .NET Framework.
  • NuGet packages for easy deployment and versioning.
  • Sample applications to get you started.

Design Principles

There were a few key design principles followed when designing and building these toolkits:

  1. Provide support for as many modern Microsoft platforms as possible with the same core library. To accomplish this, the toolkits makes use of Portable Class Libraries to enable use on the following platforms: Windows 7 (.NET 4, .NET 4.5), Windows 8, Windows Phone 8, and Silverlight 5.
  2. Avoid performance bottlenecks and application blocking. To accomplish this, the toolkits make use of the Async and Await pattern for asynchronous programming.
  3. Allow developers to take advantage of dynamic objects so that they don’t necessarily have to create classes to represent every Salesforce object.
  4. Provide the support for key operations and enable the community participate in active development of the toolkits. You will see that our policy for contributions is extremely permissive – we want you to participate!
  5. Use NuGet packages as the primary delivery mechanism while allowing access to the underlying source code. Furthermore, give developer’s access to the latest development/test packages.

 
Where Can I Find the Bits?

You can find all the source code in Github:

The NuGet packages are published here:

How Do You Get Started?

The easiest way to get started today is to use the NuGet packages.

Install-Package DeveloperForce.Force

Install-Package DeveloperForce.Chatter

Take a look at the repositories and review some of the sample code that shows you how to generate access tokens, make Force.come REST API calls, and use the Chatter API. You can take a look at the available sample applications and I also recommend reviewing the Force.com functional tests and Chatter functional tests for insight into the libraries.

Take a look at two great posts from members of the community:

What’s Next?

There is certainly more to do. Here’s a short list of additional ideas (not necessarily prioritized):

  1. Continue to provide more support for API operations. We’re only scratching the surface today.
  2. Visual Studio extension for interacting with Salesforce.
  3. Lots more samples. If you’re at all interested in getting involved, this is a great way. I’d love to work with you.
  4. Support for other APIs, such as the Streaming API, SOAP API, Toolking API, and so on.
  5. Webinars and hackathons for .NET developers.
  6. Lots more blogging and discussion about the toolkits and how to use them.

 
At the end of the day, the purpose of the Salesforce Toolkits for .NET is to make it easier for .NET developers to build amazing applications using .NET and Salesforce. This release is just the first step; there’s certainly more to do, and a lot of opportunity for you to get involved.

tagged , , , , , Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • http://www.frivjuego.co/ Friv juego

    This will be a very good source of knowledge so that we can best exploit the useful information for me. Thanks for the list that you gave us, not bad at all. Really thank you, look forward to sharing more from you.

  • gmart

    Thanks for this. Is there a tutorial for getting started?

    • Wade Wegner

      I plan to write a few tutorials. What in particular would help you?

      • gmart

        That would be cool! My initial specific need concerns registration for events. One of my clients uses Salesforce. We use a standalone conference registration form and I would like to be able to update their database to indicate which contacts registered for the event. I was thinking to use the customer’s email address and via API update Salesforce, but I don’t know where to begin.

  • jv

    Thanks a lot. I get this error “Could not load type ‘Salesforce.Common.SalesforceHttpClient’ from assembly ‘Salesforce.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’.” with ChatterClient

  • http://WWW.EXTRA-CASH-ONLINE.COM/ Robert Connor

    Thanks for the info the info and tools will come in handy!

  • martinezj

    I created a windows app and get “authentication failure – Failed: API security token required” I went to Force.com -> App Setup -> Apps. I created a new “Connected Apps” and enabled OAuth settings. I’m a bit confused, since it is asking for a Callback URL. Did I do something wrong if I want to create a windows or console app? BTW, great job on the .net SDK. Cant wait to get this setup and running.

    • martinezj

      Never mind, I figured it out. I needed to append my security token to my password.

      • Wade Wegner

        Glad you figured this out! I can’t wait to hear about the apps you’ll build.

        • martinezj

          Hello Wade. I’m able to connect to my production data with no problem. I’m having difficulty connecting to my sandbox. Is there anything different I need to do?

  • http://www.shifatullah.com/ Shifatullah

    Thanks Wade Wagner. It is indeed useful SDK for .Net developers. Is it your personal open source project or is it officially released from Salesforce? Reason for asking is that every quarter Salesforce add new features which may cause changes in API, so will Salesforce also release new version of toolkit quarterly (if it is necessary)? I mean how can we trust this SDK stay updated and synched with new versions?

    • Wade Wegner

      Glad you find this useful!

      This toolkit, and you as a developer, have my full support and the support of the Developer Relationships team here at Salesforce. We purposeful open sourced this toolkit so that, with your help, we keep up with all API releases and updates.

      Keep us honest, and if you find things don’t work or you’re having trouble, let us know. Our job is to make it easier for you to build great applications on the platform.

  • jayinatlanta

    Here’s a Windows Phone project using the Microsoft template as closely as possible, with basic parts of the Force.com Toolkit incorporated. Heavily commented including how to get up and running with a developer environment. https://wpforcedotcompivot.codeplex.com/
    Windows Store project would be extremely similar.

    • Wade Wegner

      (I thought I had replied to this already but it’s mysteriously gone!)

      This is great to see, Jay! I missed this comment and built my own sample for Windows Phone 8 too: http://www.wadewegner.com/2014/01/connecting-to-salesforce-from-a-windows-phone-8-app/. Take a look, as I use the User-Agent auth flow which doesn’t require putting secrets (either Username/Password or ConsumerKey/ConsumerSecret) on the device.

      Looking forward to learning more from your sample. Thanks again!

      • jayinatlanta

        Good, Wade. I’m sure yours is a lot more enlightening, and glad you used the other auth flow. It’s never my favorite (including from doing some jumpstarts at Dreamforce), but it’s wise.

        I was attending a Microsoft modern apps session today and thought that an ASP.NET SPA sample would be a good thing to have also. I was releasing a Windows Store example next, but I think VS 13 has a bug for the out-of-box Windows Store template… so if I get a chance, I might do the SPA with the user/agent flow.

        • Wade Wegner

          The SPA sample idea is fantastic! If you build it I’d be happy to include it in toolkit (giving you full credit, of course)!

  • Justin Helgerson

    Good to see a little more interest in the REST API. Does the current state of this help out with child relationships as well? It would be nice to be able to query data and have not only the top level object’s properties populated, but the children objects as well (e.g. query accounts and contacts).

    • Wade Wegner

      This shouldn’t be too hard to do.

  • melaugui

    Thanks a lot, I’m currently working on a Windows Phone 8 app with REST API, so this SDK is good to see !

  • http://friism.com/ friism

    It’d be pretty cool if you built a Linq-to-SOQL implementation that I could write terse LINQ queries instead of passing strings around.

    • Wade Wegner

      A lovely idea. Want to start an open-source project for us to all contribute to? =)

  • Keattisak Chinburarat

    Great news!!!!!

  • sivavarri

    Hello Mr.Wade,

    I’m getting error like ” Unable to resolve dependency ‘Microsoft.Bcl (≥ 1.1.6)’ ” when am trying to install Nuget package in visual studio 2012 for windows phone. Please help me how can i resolve this problem ?

    Thank you