2

I must be missing something, but I'm not sure what. I'm just trying to initialise the FuelSDK. I installed the package through NuGet, and I'm just doing some super basic code, but it fails on initialisation.

class Program {
    static void Main(string[] args) {
        var client = new ETClient();
    }
}

I get the following exception:

System.IO.FileNotFoundException has been thrown Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

My App config looks like so:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="fuelSDK" type="FuelSDK.FuelSDKConfigurationSection, FuelSDK" />
  </configSections>
  <fuelSDK 
    appSignature="blah"
    clientId="blah" 
    clientSecret="blah" 
    authEndPoint="https://blah.auth.marketingcloudapis.com" 
    soapEndPoint="https://blah.soap.marketingcloudapis.com" 
    restEndPoint="https://blah.rest.marketingcloudapis.com" />
</configuration>

EDIT Thanks to Jackson's helpful post, the original issue was due to being on a Mac. I added the following NuGet packages, and managed to get past that error:

  • System.ServiceModel.Primitives
  • System.ServiceModel.Http
  • System.Configuration.ConfigurationManager

However, now I get the following problem:

System.Exception has been thrown clientId or clientSecret is null: Must be provided in config file or passed when instantiating ETClient.

Endpoint settings

There's clearly something I'm missing at the elementary level, what am I missing?

1 Answer 1

2

It appears to be an issue with the NuGet package and not FuelSDK: https://github.com/dotnet/standard/issues/575

Try using a stable version: 4.4.1

3
  • Hey thanks Jackson you were correct! Maybe it's because I'm on a Mac. I ended up adding: System.ServiceModel.Primitives System.ServiceModel.Http System.Configuration.ConfigurationManager However, now I get the following problem: System.Exception has been thrown clientId or clientSecret is null: Must be provided in config file or passed when instantiating ETClient Commented Apr 9, 2019 at 2:45
  • Are you using the correct client id and client secret? If you log into the relevant Business Unit, Click Administration from the drop down under your user name. Account > Installed Packages Commented Apr 9, 2019 at 4:07
  • I don't think it is... I've uploaded the settings from the installed packages... Commented Apr 9, 2019 at 6:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .