diff --git a/src/Tools/DynamoInstallDetective/ProductLookUp.cs b/src/Tools/DynamoInstallDetective/ProductLookUp.cs index ef18245be36..509c1723e30 100644 --- a/src/Tools/DynamoInstallDetective/ProductLookUp.cs +++ b/src/Tools/DynamoInstallDetective/ProductLookUp.cs @@ -127,6 +127,7 @@ public class InstalledProductLookUp : IProductLookUp /// Product name for lookup /// public string ProductLookUpName { get; private set; } + private readonly Func fileLocator; static RegistryKey OpenKey(string key) @@ -158,8 +159,9 @@ static string GetDisplayName(RegistryKey key) /// file name pattern to lookup public InstalledProductLookUp(string lookUpName, string fileLookup) { - this.ProductLookUpName = lookUpName; - this.fileLocator = (path) => Directory.GetFiles(path, fileLookup).FirstOrDefault(); + ProductLookUpName = lookUpName; + fileLocator = (path) => Directory.EnumerateFiles(path, fileLookup, SearchOption.AllDirectories) + .FirstOrDefault(); } public InstalledProductLookUp(string lookUpName, Func fileLocator) @@ -254,8 +256,9 @@ class InstalledProduct : IInstalledProduct public InstalledProduct(string installLocation, InstalledProductLookUp lookUp) { - InstallLocation = installLocation; - var corePath = lookUp.GetCoreFilePathFromInstallation(InstallLocation); + var corePath = lookUp.GetCoreFilePathFromInstallation(installLocation); + InstallLocation = File.Exists(corePath) ? Path.GetDirectoryName(corePath) : installLocation; + VersionInfo = lookUp.GetVersionInfoFromFile(corePath); ProductName = string.Format("{0} {1}.{2}", lookUp.ProductLookUpName, VersionInfo.Item1, VersionInfo.Item2); VersionString = string.Format("{0}.{1}.{2}.{3}", VersionInfo.Item1, VersionInfo.Item2, VersionInfo.Item3, VersionInfo.Item4); diff --git a/src/Tools/DynamoShapeManager/Utilities.cs b/src/Tools/DynamoShapeManager/Utilities.cs index da72dffa409..d10733ce465 100644 --- a/src/Tools/DynamoShapeManager/Utilities.cs +++ b/src/Tools/DynamoShapeManager/Utilities.cs @@ -14,7 +14,7 @@ public static class Utilities /// /// Key words for Products containing ASM binaries /// - private static readonly List ProductsWithASM = new List() { "Revit", "Civil", "FormIt" }; + private static readonly List ProductsWithASM = new List() { "Revit", "Civil", "Robot Structural Analysis", "FormIt" }; #region public properties public static readonly string GeometryFactoryAssembly = "LibG.ProtoInterface.dll"; diff --git a/test/Libraries/DynamoUtilitiesTests/DynamoUtilitiesTests.csproj b/test/Libraries/DynamoUtilitiesTests/DynamoUtilitiesTests.csproj index 0e09c3ad3b7..b192982bfab 100644 --- a/test/Libraries/DynamoUtilitiesTests/DynamoUtilitiesTests.csproj +++ b/test/Libraries/DynamoUtilitiesTests/DynamoUtilitiesTests.csproj @@ -39,9 +39,9 @@ False True - - ..\..\extern\NUnit\nunit.framework.dll - False + + False + ..\..\..\extern\NUnit\nunit.framework.dll