I know this question is a few years old, but I recently developed a solution to do this. I stumbled across this question when trying to solve the problem myself.
First, check your permissions, see if you can process it via SSMS, but I assume you've already done that.
The second is using the right libraries. The two libraries you should be using are:
- Microsoft.AnalysisServices and
- Microsoft.AnalysisServices.Core
For me, I used version 14.x of both, and each dll needs to have the same version number
The Server object you create is actually Microsoft.AnalysisServices.Server and that class needs Microsoft.AnalysisServices.Core.Server see https://learn.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.server?view=analysisservices-dotnet
The doco at https://learn.microsoft.com/en-us/dotnet/api/microsoft.analysisservices?view=analysisservices-dotnet also highlights the need to use both libraries.
Microsoft.AnalysisServices.Core.Server is an abstract class, so you won't be able to instantiate it, that's why you use Microsoft.AnalysisServices.Server. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.core.server?view=analysisservices-dotnet
Today, you'll need to use dotnet 4.x, I don't think .Net Core will allow you to use these libraries (I could be wrong). Using .Net Core failed for me, complained about 'WindowsImpersonationContext'
In the end, the following code worked for me...
using Microsoft.AnalysisServices;
using Microsoft.AnalysisServices.Core;
void Main()
{
Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server();
server.Connect("servername") ;
Microsoft.AnalysisServices.Database db = server.Databases.FindByName("SSAS_DBName");
Microsoft.AnalysisServices.Cube cube = db.Cubes.FindByName("CubeName");
cube.Process( ProcessType.ProcessFull );
}