- When should I use Laravel’s sole() method instead of first() or firstOrFail()?
- How can Mac users create and use .NET DLLs for Business Central and Power Apps integration?
- How Can I Improve Job Management in Laravel Using Bus Chains and Batches?
- Shopware 6.7 Build JS Not Working on Mac: How to Fix basePaths[@]: unbound variable Error
How can Mac users create and use .NET DLLs for Business Central and Power Apps integration?
Integrating Microsoft Dynamics 365 Business Central with Power Apps often requires custom .NET DLLs to extend business logic, perform validations, or integrate third-party services. Traditionally, this workflow is heavily Windows-centric, which creates friction for Mac users.
The good news is that modern Business Central versions support .NET Standard libraries, making it possible to develop DLLs on macOS with the right setup. This guide explains how Mac users can build, integrate, and expose DLL-based logic for use in Business Central and Power Apps.
Problem: Windows-Only Dependency
Business Central extensions often depend on .NET DLLs, which are traditionally built using Windows-only tooling.
Why is it a problem for Mac users
- DLLs are commonly associated with Windows and the .NET Framework
- Full Visual Studio and legacy .NET Framework are not natively available on macOS
- Business Central still expects strict compatibility with supported .NET versions
As a result, Mac developers often struggle to create reusable business logic that can be safely consumed by Business Central and exposed to Power Apps.
Solution: Cross-Platform DLL Development
Mac users can overcome this limitation by using .NET Standard / .NET 6+, virtualized Windows environments, or cloud-based development tools.
Option 1: .NET Standard on macOS (Recommended)
Modern Business Central versions support .NET Standard 2.0, which can be developed directly on a Mac.
Step 1: Set up the environment
| 1 2 3 | brew install --cask dotnet-sdk dotnet --version |
Step 2: Create a class library
| 1 2 3 | dotnet new classlib -n MyBusinessCentralLibrary -f netstandard2.0 cd MyBusinessCentralLibrary |
Step 3: Add business logic
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | using System; namespace MyBusinessCentralLibrary { public class CustomerValidator { public bool ValidateEmail(string email) { if (string.IsNullOrWhiteSpace(email)) return false; try { var addr = new System.Net.Mail.MailAddress(email); return addr.Address == email; } catch { return false; } } public decimal CalculateDiscount(decimal amount, int loyaltyPoints) { decimal discountPercentage = 0; if (loyaltyPoints >= 1000) discountPercentage = 0.15m; else if (loyaltyPoints >= 500) discountPercentage = 0.10m; else if (loyaltyPoints >= 100) discountPercentage = 0.05m; return amount * discountPercentage; } } } |
Step 4: Build the DLL
| 1 | dotnet build -c Release |
| 1 | bin/Release/netstandard2.0/MyBusinessCentralLibrary.dll |
Option 2: Windows Virtual Machine
For scenarios requiring full .NET Framework support:
- Use Parallels Desktop, VMware Fusion, or UTM
- Install Windows 11 and Visual Studio Community
- Develop as if on a native Windows machine
Option 3: Cloud Development Environments
Tools like GitHub Codespaces or GitPod provide ready-to-use Windows environments without local setup.
Integrating with Business Central
Step 1: Declare the DLL in AL
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | dotnet { assembly("MyBusinessCentralLibrary") { type("MyBusinessCentralLibrary.CustomerValidator"; "CustomerValidator") { } } } |
Step 2: Use the DLL in a Codeunit
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | codeunit 50100 "Customer Validation" { procedure ValidateCustomerEmail(Email: Text): Boolean var CustomerValidator: DotNet CustomerValidator; begin CustomerValidator := CustomerValidator.CustomerValidator(); exit(CustomerValidator.ValidateEmail(Email)); end; procedure CalculateCustomerDiscount(Amount: Decimal; LoyaltyPoints: Integer): Decimal var CustomerValidator: DotNet CustomerValidator; begin CustomerValidator := CustomerValidator.CustomerValidator(); exit(CustomerValidator.CalculateDiscount(Amount, LoyaltyPoints)); end; } |
Step 3: Publish the Extension
- Place the DLL in the AL project root
- Reference it in app.json
- Compile and publish to a sandbox environment
Connecting Business Central to Power Apps
Create an API Page
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | page 50100 "Customer Validation API" { PageType = API; APIPublisher = 'yourcompany'; APIGroup = 'validation'; APIVersion = 'v1.0'; EntityName = 'customerValidation'; EntitySetName = 'customerValidations'; SourceTable = "Customer"; DelayedInsert = true; layout { area(Content) { field(email; Rec."E-Mail") { } field(isValid; IsEmailValid) { } } } var IsEmailValid: Boolean; trigger OnAfterGetRecord() var CustomerValidation: Codeunit "Customer Validation"; begin IsEmailValid := CustomerValidation.ValidateCustomerEmail(Rec."E-Mail"); end; } |
Call from Power Apps
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ClearCollect( ValidatedCustomers, ForAll( CustomerList, { Email: ThisRecord.Email, IsValid: 'BusinessCentralConnector'.ValidateEmail( { email: ThisRecord.Email } ).isValid } ) ) |
Conclusion: Build Once, Integrate Anywhere
Mac users are no longer blocked from creating Business Central DLLs. By using .NET Standard, modern tooling, and proper AL integration, you can build reusable business logic that works seamlessly with Business Central and Power Apps.
This approach enables:
- Cross-platform development
- Clean separation of business logic
- Scalable ERP–Power Platform integrations
Need help with Business Central integrations, Power Apps, or custom extension development?
Explore our Business Central & Power Platform services and let our experts handle the complexity for you.
Recent help desk articles
Greetings! I'm Aneesh Sreedharan, CEO of 2Hats Logic Solutions. At 2Hats Logic Solutions, we are dedicated to providing technical expertise and resolving your concerns in the world of technology. Our blog page serves as a resource where we share insights and experiences, offering valuable perspectives on your queries.

