How to use a c# dll project as reference

Tool: Visual Studio 2022
Version: Latest version Trial

Hi, i’m currently evaluating Powershell pro tool and I have questions. ( by the way I followed the documentation and didn’t find what I want.)

See below my use case;
I want to create a powershell module with a reference to a c# .net core dll who will contain function I want to run in powershell. I add the second project in the powershell module project and I add the project as a reference in my module project. See the image below, for example.

2024-05-30 10_52_25-Document1 - Word

My goal is to do something like that in my script
$instance = New-Object vCube_Framework.DB -ArgumentList $ConnString
$result = $instance.Execute($sqlQuery)
Do I need to add a pre-build event that will generate the dll or do you have something like that in the configuration who will do that ? Also keep in mind this module would be used in azure automation account. Note the copy local is a true for the reference.