Blog Post

Building Dataverse Plugins on macOS

June 4, 2025 (1mo ago)

After wrestling with .NET Framework dependencies in Microsoft Dataverse plugin projects, I found a reliable way to develop and build them on macOS. The challenge was handling complex assemblies with extensive business logic and framework dependencies. Here's the path I discovered through trial and error.

The Challenge

Dataverse plugin development traditionally assumes Windows, which becomes problematic when your plugin has:

Prerequisites

You'll need:

Setting Up the Build Environment

First, clean up any conflicting installations:

brew uninstall --ignore-dependencies mono

Install the Mono Development Kit:

brew install --cask mono-mdk
hash -r

Verify the installation:

# Check msbuild
which msbuild
msbuild -version
 
# Check NuGet
which nuget
nuget help

Building Your Plugin

Clone and prepare your project:

git clone <your-repository-url>
cd <plugin-directory>

Restore NuGet packages:

nuget restore YourSolution.sln

Build the solution:

msbuild YourSolution.sln \
  /t:Rebuild \
  /p:Configuration=Release \
  /p:Platform="Any CPU"

Common Challenges

Through my experience with this setup, I found several key considerations:

  1. Path separators differ between macOS (/) and Windows (\)
  2. Framework references require special attention on macOS
  3. Windows-specific MSBuild targets often need bypassing
  4. NuGet package restoration may need manual intervention

The Windows Part

Plugin registration still requires Windows access. You have two options:

I've found running the Plugin Registration Tool in a lightweight Windows VM works best for development.

Final Thoughts

While we can't completely eliminate the Windows requirement, this setup enables productive Dataverse plugin development on macOS. The initial configuration requires some patience, but the resulting workflow is smooth and reliable.

Remember to check the Dataverse SDK documentation for the latest development guidelines and best practices.