8

I'm trying to implement XConnect in a Sitecore context and using the code snippet

using (Sitecore.XConnect.Client.XConnectClient client = Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient()) { }

Here,

Error CS0234 The type or namespace name 'Configuration' does not exist in the namespace 'Sitecore.XConnect.Client' (are you missing an assembly reference?)

I have added Sitecore.xConnect and Sitecore.xConnect.Client into the references as well as in the name space. But Still the issue is not resolved and getting this error. I have added these dll's through nuget package manager. Any idea on this issue or I'm missing something??

Refering this Sitecore doc website

  • Can you add reference to Sitecore.Configuration namespace ? – Vlad Iobagiu Jan 3 '18 at 11:47
  • I Couldn't find sitecore.configuration dll from nuget or from bin folder. what is the exact name of the dll. Sitecore.configuration is present in sitecore.kernel dll. After adding that also same error is showing – Sudheer Suggu Jan 3 '18 at 13:16
  • Sitecore.Configuration is in Sitecore.Kernel.dll, please try to add reference to using System.Configuration; – Vlad Iobagiu Jan 3 '18 at 13:30
  • 1
    Here I have added - Sitecore.XConnect.Client.Configuration dll which has removed the name space error.. Can I use this ..? – Sudheer Suggu Jan 3 '18 at 13:32
  • 2
    yes..that's the correct dll – Marco Jan 3 '18 at 16:36
7

After adding Sitecore.XConnect.Client.Configuration dll from nuget package has resolved my issue which helps in creating Xconnect client object in sitecore context.

Sitecore.XConnect.Client.Configuration dll

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.