0

I've seen this error in C# before when referencing a class with private properties, but I'm at a loss here, as this class has public properties. It's actually a microsoft .dll

I'm creating a new object:

XmlaClient clnt = new XmlaClient();

But that's where the "Class is inaccessible due to its protection level" error is coming from. I look at the class (dll) definition, and it shows all the items inside are public. Here's an excerpt:

using System.Data;

namespace Microsoft.AnalysisServices
{
    internal class XmlaClient
    {
        public XmlaClient();

        public ConnectionInfo ConnectionInfo { get; }
        public IdentityTransferToken IdentityTransferToken { get; set; }
        #etc etc

One thing I noticed is the namespace is different than my project's. My other .dll references have their own unique namespaces, so I didn't think that was the issue. Just a thought though.

Edit: Attempting to use Microsoft.AnalysisServices.AdomdClient.dll now. It seems quite a bit different than the previous DLL though.

coinbird
  • 1,202
  • 4
  • 24
  • 44
  • Possible duplicate of [xmlaclient.Discover(MDSCHEMA\_MODULES,...) System out of memory exception](https://stackoverflow.com/questions/3241401/xmlaclient-discovermdschema-modules-system-out-of-memory-exception) – Eris Jul 24 '19 at 17:29
  • 1
    @Eris: Did you paste the wrong link? – Robert Harvey Jul 24 '19 at 17:30
  • While the topic of that question is different, the answer is still valid for this question. – Eris Jul 24 '19 at 17:30
  • 1
    @Eris: That's pretty far afield to make it a duplicate of this specific question. – Robert Harvey Jul 24 '19 at 17:31
  • 2
    @Eris I'm looking into the new DLL referenced there now to see if it will do what I need it to. Thanks for the link. – coinbird Jul 24 '19 at 17:37

1 Answers1

4

The class itself is not public

internal class XmlaClient
^^^^^^^^
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
juergen d
  • 201,996
  • 37
  • 293
  • 362