diff --git a/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs b/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs index 8173936..d53ffa7 100644 --- a/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs +++ b/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.43.0")] -[assembly: AssemblyFileVersion("5.0.43.0")] +[assembly: AssemblyVersion("5.0.44.0")] +[assembly: AssemblyFileVersion("5.0.44.0")] diff --git a/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj b/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj index f47a4ba..4e80029 100644 --- a/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj +++ b/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj @@ -28,6 +28,12 @@ "Entry" { "MsmKey" = "8:_0182F649532C289AB58CA84091A3EF12" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_0182F649532C289AB58CA84091A3EF12" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -40,12 +46,6 @@ "Entry" { "MsmKey" = "8:_0182F649532C289AB58CA84091A3EF12" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_0182F649532C289AB58CA84091A3EF12" "OwnerKey" = "8:_3BA1BB04BE8689BEF79234210621C61F" "MsmSig" = "8:_UNDEFINED" } @@ -298,6 +298,12 @@ "Entry" { "MsmKey" = "8:_1B2251DD757994082D5D85D7C9A38F82" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_1B2251DD757994082D5D85D7C9A38F82" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -309,12 +315,6 @@ } "Entry" { - "MsmKey" = "8:_1B2251DD757994082D5D85D7C9A38F82" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_1BC4692718F94CD799480D14260E2A0D" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -532,6 +532,12 @@ "Entry" { "MsmKey" = "8:_4126FF7CFF23C51CF812060FAEF25A8B" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_4126FF7CFF23C51CF812060FAEF25A8B" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -544,12 +550,6 @@ "Entry" { "MsmKey" = "8:_4126FF7CFF23C51CF812060FAEF25A8B" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4126FF7CFF23C51CF812060FAEF25A8B" "OwnerKey" = "8:_6B0FABA5989346D0B8E84750E592385D" "MsmSig" = "8:_UNDEFINED" } @@ -664,13 +664,13 @@ "Entry" { "MsmKey" = "8:_4BD33B3CE11FBA409F994DAC22BFA8B3" - "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_4BD33B3CE11FBA409F994DAC22BFA8B3" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1006,6 +1006,12 @@ "Entry" { "MsmKey" = "8:_7344099411A9D2DBF4A784E3DE9EA77D" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_7344099411A9D2DBF4A784E3DE9EA77D" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1018,12 +1024,6 @@ "Entry" { "MsmKey" = "8:_7344099411A9D2DBF4A784E3DE9EA77D" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_7344099411A9D2DBF4A784E3DE9EA77D" "OwnerKey" = "8:_6B0FABA5989346D0B8E84750E592385D" "MsmSig" = "8:_UNDEFINED" } @@ -1144,6 +1144,12 @@ "Entry" { "MsmKey" = "8:_7C49A244BD86813B688A86097B64A4BB" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_7C49A244BD86813B688A86097B64A4BB" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1155,12 +1161,6 @@ } "Entry" { - "MsmKey" = "8:_7C49A244BD86813B688A86097B64A4BB" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_7C66897615D04979AA00553FFBE9F869" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -1204,6 +1204,12 @@ "Entry" { "MsmKey" = "8:_7FE319AF420BED1331D231C9E53A5979" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_7FE319AF420BED1331D231C9E53A5979" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1216,12 +1222,6 @@ "Entry" { "MsmKey" = "8:_7FE319AF420BED1331D231C9E53A5979" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_7FE319AF420BED1331D231C9E53A5979" "OwnerKey" = "8:_6B0FABA5989346D0B8E84750E592385D" "MsmSig" = "8:_UNDEFINED" } @@ -1384,6 +1384,12 @@ "Entry" { "MsmKey" = "8:_8E074FE5AC5B455E0A4D2F176BA182EC" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_8E074FE5AC5B455E0A4D2F176BA182EC" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1396,12 +1402,6 @@ "Entry" { "MsmKey" = "8:_8E074FE5AC5B455E0A4D2F176BA182EC" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8E074FE5AC5B455E0A4D2F176BA182EC" "OwnerKey" = "8:_6B0FABA5989346D0B8E84750E592385D" "MsmSig" = "8:_UNDEFINED" } @@ -1450,6 +1450,12 @@ "Entry" { "MsmKey" = "8:_90FAC219254FDDE26D273DDEF52262FA" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_90FAC219254FDDE26D273DDEF52262FA" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1462,12 +1468,6 @@ "Entry" { "MsmKey" = "8:_90FAC219254FDDE26D273DDEF52262FA" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_90FAC219254FDDE26D273DDEF52262FA" "OwnerKey" = "8:_6B0FABA5989346D0B8E84750E592385D" "MsmSig" = "8:_UNDEFINED" } @@ -1810,6 +1810,12 @@ "Entry" { "MsmKey" = "8:_BE16C201755759965787B7DDD5BFF7B9" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_BE16C201755759965787B7DDD5BFF7B9" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1822,12 +1828,6 @@ "Entry" { "MsmKey" = "8:_BE16C201755759965787B7DDD5BFF7B9" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BE16C201755759965787B7DDD5BFF7B9" "OwnerKey" = "8:_6B0FABA5989346D0B8E84750E592385D" "MsmSig" = "8:_UNDEFINED" } @@ -1882,6 +1882,12 @@ "Entry" { "MsmKey" = "8:_C097D550A85D95BEFF69F1B452227F75" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_C097D550A85D95BEFF69F1B452227F75" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -1894,12 +1900,6 @@ "Entry" { "MsmKey" = "8:_C097D550A85D95BEFF69F1B452227F75" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_C097D550A85D95BEFF69F1B452227F75" "OwnerKey" = "8:_1B2251DD757994082D5D85D7C9A38F82" "MsmSig" = "8:_UNDEFINED" } @@ -2266,6 +2266,12 @@ "Entry" { "MsmKey" = "8:_E6C48E30804B563751F799BDB82D2D5F" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E6C48E30804B563751F799BDB82D2D5F" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -2278,12 +2284,6 @@ "Entry" { "MsmKey" = "8:_E6C48E30804B563751F799BDB82D2D5F" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_E6C48E30804B563751F799BDB82D2D5F" "OwnerKey" = "8:_7344099411A9D2DBF4A784E3DE9EA77D" "MsmSig" = "8:_UNDEFINED" } @@ -2356,6 +2356,12 @@ "Entry" { "MsmKey" = "8:_EEEF3B4DA37D965DCA452A1E7B283C82" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_EEEF3B4DA37D965DCA452A1E7B283C82" "OwnerKey" = "8:_0020EC0A2900F50F0F5DCC3E7BBE4237" "MsmSig" = "8:_UNDEFINED" } @@ -2367,12 +2373,6 @@ } "Entry" { - "MsmKey" = "8:_EEEF3B4DA37D965DCA452A1E7B283C82" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_EF0C782C601F42DE8C7EF094FA4ED82E" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -2560,6 +2560,12 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_1AC259E78F48430A97FB3A4F9B9A4E7E" "MsmSig" = "8:_UNDEFINED" } @@ -2608,12 +2614,6 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_1F23AE629378259BAD7F2BCAB42727AD" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_0FD8120FEC5AB531A28085D3548D2C38" "MsmSig" = "8:_UNDEFINED" } @@ -2908,7 +2908,7 @@ { "Name" = "8:.NET Framework" "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:v4.6.1 " + "FrameworkVersion" = "8:v4.6.1 " "AllowLaterVersions" = "11:FALSE" "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=671728" } @@ -2920,7 +2920,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:BismNormalizer, Version=5.0.42.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:BismNormalizer, Version=5.0.43.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL" "ScatterAssemblies" { "_0020EC0A2900F50F0F5DCC3E7BBE4237" @@ -3857,7 +3857,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:BismNormalizer, Version=5.0.42.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:BismNormalizer, Version=5.0.43.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL" "ScatterAssemblies" { "_1F23AE629378259BAD7F2BCAB42727AD" @@ -9416,15 +9416,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Power BI ALM Toolkit" - "ProductCode" = "8:{825F05E3-E7DB-4F2E-88D2-CE7634DA0B60}" - "PackageCode" = "8:{B658B9F8-52BE-4B54-95EA-3B10C5B84476}" + "ProductCode" = "8:{78EAF468-FF3F-4937-A4DE-FE2FD676B42A}" + "PackageCode" = "8:{8B931D02-8DEA-4A77-9099-317EA46989A4}" "UpgradeCode" = "8:{96819CFD-6462-4AD1-ADB4-7903F30ADB92}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:5.0.43" + "ProductVersion" = "8:5.0.44" "Manufacturer" = "8:Power BI ALM Toolkit" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" diff --git a/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs b/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs index 4af2e66..5d302b5 100644 --- a/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs +++ b/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.43.0")] -[assembly: AssemblyFileVersion("5.0.43.0")] +[assembly: AssemblyVersion("5.0.44.0")] +[assembly: AssemblyFileVersion("5.0.44.0")] diff --git a/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs b/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs index f1a5e7e..2ce1546 100644 --- a/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs +++ b/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.43.0")] -[assembly: AssemblyFileVersion("5.0.43.0")] +[assembly: AssemblyVersion("5.0.44.0")] +[assembly: AssemblyFileVersion("5.0.44.0")] diff --git a/BismNormalizer/BismNormalizer/BismNormalizer.IconSetup.exe b/BismNormalizer/BismNormalizer/BismNormalizer.IconSetup.exe index 98e3bc6..23b8ba2 100644 Binary files a/BismNormalizer/BismNormalizer/BismNormalizer.IconSetup.exe and b/BismNormalizer/BismNormalizer/BismNormalizer.IconSetup.exe differ diff --git a/BismNormalizer/BismNormalizer/BismNormalizer.exe b/BismNormalizer/BismNormalizer/BismNormalizer.exe index 36f44ab..c20e577 100644 Binary files a/BismNormalizer/BismNormalizer/BismNormalizer.exe and b/BismNormalizer/BismNormalizer/BismNormalizer.exe differ diff --git a/BismNormalizer/BismNormalizer/Properties/AssemblyInfo.cs b/BismNormalizer/BismNormalizer/Properties/AssemblyInfo.cs index b092b97..a0819af 100644 --- a/BismNormalizer/BismNormalizer/Properties/AssemblyInfo.cs +++ b/BismNormalizer/BismNormalizer/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.43.0")] -[assembly: AssemblyFileVersion("5.0.43.0")] +[assembly: AssemblyVersion("5.0.44.0")] +[assembly: AssemblyFileVersion("5.0.44.0")] diff --git a/BismNormalizer/BismNormalizer/TabularCompare/DesktopInstances/PowerBIHelper.cs b/BismNormalizer/BismNormalizer/TabularCompare/DesktopInstances/PowerBIHelper.cs index 51e15cb..2e9c18e 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/DesktopInstances/PowerBIHelper.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/DesktopInstances/PowerBIHelper.cs @@ -12,21 +12,58 @@ namespace BismNormalizer.TabularCompare.UI.DesktopInstances PowerBI, Devenv, PowerBIReportServer, - Loading + Loading, + None } public class PowerBIInstance { - public PowerBIInstance(string name, int port, EmbeddedSSASIcon icon) + public static readonly string[] PBIDesktopMainWindowTitleSuffixes = new string[] { - var dashPos = name.LastIndexOf(" - "); - if (dashPos >= 0) - { Name = name.Substring(0, dashPos); } // Strip "Power BI Designer" or "Power BI Desktop" off the end of the string + // Different characters are used as a separator in the PBIDesktop window title depending on the current UI culture/localization + // See https://github.com/sql-bi/Bravo/issues/476 + " \u002D Power BI Desktop", // Dash Punctuation - minus hyphen + " \u2212 Power BI Desktop", // Math Symbol - minus sign + " \u2011 Power BI Desktop", // Dash Punctuation - non-breaking hyphen + " \u2013 Power BI Desktop", // Dash Punctuation - en dash + " \u2014 Power BI Desktop", // Dash Punctuation - em dash + " \u2015 Power BI Desktop", // Dash Punctuation - horizontal bar + }; + + public PowerBIInstance(string windowTitle, int port, EmbeddedSSASIcon icon) + { Port = port; Icon = icon; + //try + //{ + // Strip "Power BI Designer" or "Power BI Desktop" off the end of the string + foreach (var suffix in PBIDesktopMainWindowTitleSuffixes) + { + var index = windowTitle.LastIndexOf(suffix); + if (index >= 1) + { + Name = windowTitle.Substring(0, index).Trim(); + break; + } + } + + if (string.IsNullOrEmpty(Name)) + { + //if (port != -1) + //{ + // Log.Warning(Constants.LogMessageTemplate, nameof(PowerBIInstance), "ctor", $"Unable to find ' - Power BI Desktop' in Power BI title '{windowTitle}'"); + //} + Name = windowTitle; + } + //} + //catch (Exception ex) + //{ + // Log.Error(ex, Constants.LogMessageTemplate, nameof(PowerBIInstance), "ctor", ex.Message); + // Name = windowTitle; + //} } - public string Name { get; private set; } public int Port { get; private set; } + public string Name { get; private set; } public EmbeddedSSASIcon Icon { get; private set; } } @@ -34,56 +71,61 @@ namespace BismNormalizer.TabularCompare.UI.DesktopInstances public class PowerBIHelper { - public static List GetLocalInstances() + public static List GetLocalInstances(bool includePBIRS) { List _instances = new List(); _instances.Clear(); var dict = ManagedIpHelper.GetExtendedTcpDictionary(); - foreach (var proc in Process.GetProcessesByName("msmdsrv")) + var msmdsrvProcesses = Process.GetProcessesByName("msmdsrv"); + foreach (var proc in msmdsrvProcesses) { int _port = 0; + string parentTitle = string.Empty; // $"localhost:{_port}"; EmbeddedSSASIcon _icon = EmbeddedSSASIcon.PowerBI; var parent = proc.GetParent(); - // exit here if the parent == "services" then this is a SSAS instance - if (parent.ProcessName.Equals("services", StringComparison.OrdinalIgnoreCase)) continue; - - // exit here if the parent == "RSHostingService" then this is a SSAS instance - if (parent.ProcessName.Equals("RSHostingService", StringComparison.OrdinalIgnoreCase)) + if (parent != null) { - // only show PBI Report Server if we are running as admin - // otherwise we won't have any access to the models - if (IsAdministrator()) - _icon = EmbeddedSSASIcon.PowerBIReportServer; - else - continue; + // exit here if the parent == "services" then this is a SSAS instance + if (parent.ProcessName.Equals("services", StringComparison.OrdinalIgnoreCase)) continue; + + // exit here if the parent == "RSHostingService" then this is a SSAS instance + if (parent.ProcessName.Equals("RSHostingService", StringComparison.OrdinalIgnoreCase)) + { + // only show PBI Report Server if we are running as admin + // otherwise we won't have any access to the models + if (IsAdministrator() && includePBIRS) + _icon = EmbeddedSSASIcon.PowerBIReportServer; + else + continue; + } + + // if the process was launched from Visual Studio change the icon + if (parent.ProcessName.Equals("devenv", StringComparison.OrdinalIgnoreCase)) _icon = EmbeddedSSASIcon.Devenv; + + // get the window title so that we can parse out the file name + parentTitle = parent.MainWindowTitle; + + if (parentTitle.Length == 0) + { + // for minimized windows we need to use some Win32 api calls to get the title + //parentTitle = WindowTitle.GetWindowTitleTimeout( parent.Id, 300); + parentTitle = WindowTitle.GetWindowTitle(parent.Id); + } } - - // if the process was launched from Visual Studio change the icon - if (parent.ProcessName.Equals("devenv", StringComparison.OrdinalIgnoreCase)) _icon = EmbeddedSSASIcon.Devenv; - - // get the window title so that we can parse out the file name - var parentTitle = parent.MainWindowTitle; - if (parentTitle.Length == 0) - { - // for minimized windows we need to use some Win32 api calls to get the title - //parentTitle = WindowTitle.GetWindowTitleTimeout( parent.Id, 300); - parentTitle = WindowTitle.GetWindowTitle(parent.Id); - } - // try and get the tcp port from the Win32 TcpTable API //try //{ - TcpRow tcpRow = null; - dict.TryGetValue(proc.Id, out tcpRow); - if (tcpRow != null) - { - _port = tcpRow.LocalEndPoint.Port; - _instances.Add(new PowerBIInstance(parentTitle, _port, _icon)); - //Log.Debug("{class} {method} PowerBI found on port: {port}", "PowerBIHelper", "Refresh", _port); - } + TcpRow tcpRow = null; + dict.TryGetValue(proc.Id, out tcpRow); + if (tcpRow != null) + { + _port = tcpRow.LocalEndPoint.Port; + _instances.Add(new PowerBIInstance(parentTitle, _port, _icon)); + //Log.Debug("{class} {method} PowerBI found on port: {port}", "PowerBIHelper", "Refresh", _port); + } // else // { // //Log.Debug("{class} {method} PowerBI port not found for process: {processName} PID: {pid}", "PowerBIHelper", "Refresh", proc.ProcessName, proc.Id); @@ -94,7 +136,6 @@ namespace BismNormalizer.TabularCompare.UI.DesktopInstances //{ // //Log.Error("{class} {Method} {Error} {StackTrace}", "PowerBIHelper", "Refresh", ex.Message, ex.StackTrace); //} - } return _instances; } diff --git a/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs b/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs index 14ae4de..6df2bec 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/UI/ConnectionsAlmt.cs @@ -87,7 +87,7 @@ namespace BismNormalizer.TabularCompare.UI _powerBIInstances.Clear(); try { - _powerBIInstances = PowerBIHelper.GetLocalInstances(); + _powerBIInstances = PowerBIHelper.GetLocalInstances(includePBIRS:false); } catch { } diff --git a/BismNormalizer/BismNormalizer/source.extension.vsixmanifest b/BismNormalizer/BismNormalizer/source.extension.vsixmanifest index fcb7b4e..9bd7370 100644 --- a/BismNormalizer/BismNormalizer/source.extension.vsixmanifest +++ b/BismNormalizer/BismNormalizer/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + BISM Normalizer BISM Normalizer manages Analysis Services tabular models http://bism-normalizer.com/