Welcome to the new Box Support website. Check out all the details here on what’s changed.

Box SDK for .net - VB.net Async / Await issue

Answered
New post

Comments

1 comment

  • jbwils

    Answered my own question. I forgot to install Microsoft.Bcl.Async. Once that was installed, this code works:

     

    Const DevToken As String = "abc123"
            Dim BoxConfig As New Box.V2.Config.BoxConfig("abc123", "abc123", New System.Uri("https://localhost/"))
            Dim BoxSession As New Box.V2.Auth.OAuthSession(DevToken, "NOT_NEEDED", 3600, "bearer")
            Dim BoxClient As New Box.V2.BoxClient(BoxConfig, BoxSession)
            Dim MetaDataMgr As Box.V2.Managers.BoxMetadataManager
            Dim AllTemplates As Box.V2.Models.BoxEnterpriseMetadataTemplateCollection(Of Box.V2.Models.BoxMetadataTemplate)
            MetaDataMgr = BoxClient.MetadataManager
            AllTemplates = Await MetaDataMgr.GetEnterpriseMetadataAsync("enterprise")
    0
    Comment actions Permalink

Please sign in to leave a comment.