You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
protectedvirtualstringBuildLocalConnectionString(stringname){varprocesses= System.Diagnostics.Process.GetProcessesByName("msmdsrv");if(processes==null|| processes.Count()==0){thrownew ConnectionException
(new InvalidOperationException("No process found with the name 'msmdsrv'. Are you sure your Power BI desktop solution is running?"),string.Format("PBIX = {0}", name));}// ...}
If NBi is configured to start the PBIDesktop.exe in <setup />, the current version takes a while to get going which means this is very likely to fail. Would it be possible to poll until the process is up, only failing after a timeout? Something like this perhaps:
privatestaticasync Task DelayUntilServerIsRunningAsync(intdelay=2000,inttimeout=10000){varend= DateTime.Now.AddMilliseconds(timeout);varprocesses= System.Diagnostics.Process.GetProcessesByName("msmdsrv");while(!processes.Any()&& DateTime.Now <end){await Task.Delay(delay);processes= System.Diagnostics.Process.GetProcessesByName("msmdsrv");}if(!processes.Any()){thrownew ConnectionException
(new InvalidOperationException("No process found with the name 'msmdsrv'. Are you sure your Power BI desktop solution is running?"));}}
Also I have noticed that Power BI accepts a /diagnosticsPort command line parameter which allows you to specify the port of the AS server.
The text was updated successfully, but these errors were encountered:
currently I think the PBI support checks for the existence of the msmdsrv process before throwing if it can't find it.
https://github.com/Seddryck/NBi/blob/620544d23c0f52eb606c0c6dfcd67548fce538df/NBi.Core/PowerBiDesktop/PowerBiDesktopConnectionStringBuilder.cs
If NBi is configured to start the PBIDesktop.exe in
<setup />
, the current version takes a while to get going which means this is very likely to fail. Would it be possible to poll until the process is up, only failing after a timeout? Something like this perhaps:Also I have noticed that Power BI accepts a /diagnosticsPort command line parameter which allows you to specify the port of the AS server.
The text was updated successfully, but these errors were encountered: