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:
- Complex .NET Framework dependencies
- Multiple assembly references
- Windows-specific build targets
- Mixed platform dependencies
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:
- Path separators differ between macOS (
/
) and Windows (\
) - Framework references require special attention on macOS
- Windows-specific MSBuild targets often need bypassing
- NuGet package restoration may need manual intervention
The Windows Part
Plugin registration still requires Windows access. You have two options:
- Plugin Registration Tool (Windows)
- Power Platform CLI (pac)
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.