1 year ago

#332522

test-img

ezG

How does one register Microsoft.Graph.Core for COM Interop

Using Visual Studio 2019 16.11.11 Project: .NET Framework 4.8

Message when I build my project: The assembly 'Microsoft.Graph.Core, Version=2.0.8.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx' is not registered for COM Interop. Please register it with regasm.exe /tlb.

The following was returned is a message that says the type was registered successfully followed by a bunch of warnings and to finish up with the same RA0000 error I'd gotten before, only with a different Assembly.

I've tried deleted the Bin folder and re-building the project but that didn't work.

Any ideas?

Microsoft .NET Framework Assembly Registration Utility version 4.8.4084.0
for Microsoft .NET Framework version 4.8.4084.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Types registered successfully
Type library exporter warning processing 'Microsoft.Graph.CollectionPage 1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.ICollectionPage 1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.IEncryptedContentBearer  1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.ITokenValidable2, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.UploadResult1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.AsyncMonitor1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.BaseActionMethodRequestBuilder1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.BaseFunctionMethodRequestBuilder1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.GraphResponse1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.IAsyncMonitor1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.DerivedTypeConverter1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.InterfaceConverter1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.LargeFileUploadTask1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
Type library exporter warning processing 'Microsoft.Graph.PageIterator1, Microsoft.Graph.Core'. Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
RegAsm : error RA0000 : Type library exporter encountered an error while processing 'Microsoft.Graph.ITokenValidableExtension+<AreTokensValid>d__0`2, Microsoft.Graph.Core'. Error: Type library exporter cannot load type '<AreTokensValid>d__0`2' (error: Could not load file or assembly 'Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=6.15.1.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)).

azure-devops

microsoft-graph-api

com-interop

0 Answers

Your Answer

Accepted video resources