How to use DocumentUltimate on MacOS


1. Install the .NET SDK (it also includes the .NET Runtime for same version):

a. Note that Microsoft no longer supports installing older versions of SDK or Runtime via installer. So for example, if your project target framework is net6.0, you should install it manually with script method provided by Microsoft:

If you don't already have wget command, get it with these lines (via homebrew):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
export PATH=$PATH:/opt/homebrew/bin

brew install wget

Now you can download the script and execute it:

chdir ~/Downloads
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh

./dotnet-install.sh --channel 6.0
Ref:

b. As we used the script method, edit bash profile file in your home directory and added these lines for being able to access dotnet commands (or if you run the lines in terminal, the env variables will exist until your terminal is closed):

export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

     Ref:


2. Install System.Drawing.Common dependencies as some conversions (e.g. Excel files) still depend on it as of current version:

brew install mono-libgdiplus

Microsoft decided to make package System.Drawing.Common "Windows only" in .NET 6 and higher. 

So you need to opt-in to be able to use System.Drawing.Common package on MacOS.
Edit your project's .csproj file and add these lines:

<ItemGroup>
  <RuntimeHostConfigurationOption Include="System.Drawing.EnableUnixSupport" Value="true" />
</ItemGroup>

4. Now you are ready to run your project with dotnet run