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.
There's clearly something I'm missing at the elementary level, what am I missing?