blazor - how I can add third party bass.net for blazor client and blazor server

hungnt 1 Reputation point
2021-02-06T15:15:58.087+00:00

Hi,

I have created blazor app that needed to integrate with bass.net library.

Bass.net is a wrapper of native bass.dll that is audio library ( include streaming feature that I need in my project ). There is no error when added these file .dll , .net. Compiling is good as well. But the time of executing first function call of bass.net , it make web app crashed.

I don't know how to check if a .dll run with blazor, does anyone give me an suggestion?

Thanks,
Hung

Developer technologies | .NET | Blazor
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Michael Wang-MSFT 1,061 Reputation points
    2021-02-08T07:36:25.863+00:00

    Hi, @hungnt ,

    From the official document, we can see the tips below.

    The native BASS libraries are NOT included and need to be downloaded seperately - so make sure to place the BASS library and the needed add-on libraries to your project executable directory (e.g. place the bass.dll to your .\bin\Debug folder).

    So please check the libraries in your \bin\Debug folder while running on debug mode.

    If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,
    Michael Wang


  2. nguyen tien hung 1 Reputation point
    2021-02-26T15:29:22.197+00:00

    Hi,

    I have created blazor project with TargetFramework .netcore 3.0, and used bass.net in ./core directory but it still does not work.

    Attachment is error found. Hope give you more details

    72495-viber-image-2021-02-26-22-13-59.jpg


  3. joyi john 1 Reputation point
    2021-11-15T06:46:48.413+00:00

    I have implemented bass.net in blazor server (net 6.0)

    you need to download the stable release from http://bass.radio42.com/ first
    then unzip and find the dlls in core folder.
    then see the attached image
    it should work
    149247-bass.png

    0 comments No comments

  4. Bruce (SqlWork.com) 78,006 Reputation points Volunteer Moderator
    2021-11-15T16:26:02.937+00:00

    Bass.net is a wrapper around a set of native o/s dlls to make them callable from C#. This means you can only use them with Blazor server (as Blazor client does not support native dlls). With Blazor server, and all devices and playback will be on the server.

    That is, your Blazor app will be a browser control panel for the server which runs the bass software, not sure this is your intention.

    If you mean the software to run on the client device, then Blazor (or web apps) are not the answer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.