MicroStationSDK Update12 - VS2017 Professional

I am trying to build the examples in MicroStationSDK Update 12 and receive the following error:

Cannot find the .Net tools location for this toolset.  VS2017_DotNetToolsDir was not defined, and registry lookup failed.

I have verified that VS2017 has the .NET desktop development, desktop development with C++ and Universal Windows Platform development workloads installed.  I am also running the MicroStationSDK command window as Administrator. 

Any suggestions on why I am getting this error?

Thanks,

Larry

Parents
  • I'm a bit late to the party, but I'm going through the same process, and have encountered the same errors while trying to build the delivered examples. I've edited a couple of .mki files (details below), imported the reg keys Robert supplied, and have got rid of all the errors mentioned in this thread (I think), but am now up against one I'm not sure how to fix.

    SDK version is 10.12.00.41, MS VS2017 is the Community edition which I'm led to believe has worked for others, specific version is 15.9.12, which appears to be about a week old, so has probably changed things again from what was found by others looking into this. Windows environment is Win 7 64, with SP1 applied.

    I've installed the following VS Workloads:

    .NET desktop development

    Desktop development with C++

    Universal Windows Platform Development


    The first error I had was the "unhandled exception code 0xe0434352", which I can see others have encountered before (but I've not found how it was resolved) I tracked this to the attempt to read the registry, which starts at line 360 in AssertToolSet.mki. My solution, rightly or wrongly, was to hard code the VS path into the environment variable, so I now have:

                    SetTheVar:
                        ~@putenv VS2017Dir="C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/"    # HARD CODE VS PATH
    #                    ~@putenv VS2017Dir=$(VSProductDir)/

    Next error was

    Macro (VCVarsQueryRegistry2017.mki:94): VS2017_DotNetToolsDir=$[@realpath $[@registryread "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools", "InstallationFolder"]]
    BMAKE: Error - Cannot find the .Net tools location for this toolset. VS2017_DotNetToolsDir was not defined, and registry lookup failed.
    BMAKE: call trace
        line:   96, D:\PROGRA~1\Bentley\MICROS~2\mki\VCVarsQueryRegistry2017.mki
        line:  960, D:\PROGRA~1\Bentley\MICROS~2\mki\AssertToolSet.mki
        line:  114, D:\PROGRA~1\Bentley\MICROS~2\mki\ConfigurePolicy.mki
        line:   26, D:\PROGRA~1\Bentley\MICROS~2\mki\mdl.mki
        line:   17, D:\PROGRA~1\Bentley\MICROS~2\examples\Elements\exampletool\exampletool.mke

    Examining the registry showed I have ...NETFXSDK\4.6.1\... and ...NETFXSDK\4.7.2\... , but not the 4.6.2 entry others have found, this could be owing to the very recent version of VS I've installed.

    Edited lines 94 & 101 in VCVarsQueryRegistry2017.mki, changing 4.6 to 4.7.2 in both cases.

    I'm now left with the third error:

    Macro (AssertToolSet.mki:975): TOOL_VERSION=14.16
    BMAKE: Error - ToolSet version 14.16.XXX is required (version found= )
    BMAKE: call trace
        line:  979, D:\PROGRA~1\Bentley\MICROS~2\mki\AssertToolSet.mki
        line:  114, D:\PROGRA~1\Bentley\MICROS~2\mki\ConfigurePolicy.mki
        line:   26, D:\PROGRA~1\Bentley\MICROS~2\mki\mdl.mki
        line:   17, D:\PROGRA~1\Bentley\MICROS~2\examples\Elements\exampletool\exampletool.mke


    Judging by the output, it isn't finding any version (I found another post where this error had occured but in that case a version was found).

    The 'Microsoft.VCToolsVersion.default.txt' file, which seems to be what bmake is looking for, is present in specified location and contains "14.16.27023" which, on the face of it, should match.


    Any suggestions as to where I go from here?

    Thanks,

    Simon.






Reply
  • I'm a bit late to the party, but I'm going through the same process, and have encountered the same errors while trying to build the delivered examples. I've edited a couple of .mki files (details below), imported the reg keys Robert supplied, and have got rid of all the errors mentioned in this thread (I think), but am now up against one I'm not sure how to fix.

    SDK version is 10.12.00.41, MS VS2017 is the Community edition which I'm led to believe has worked for others, specific version is 15.9.12, which appears to be about a week old, so has probably changed things again from what was found by others looking into this. Windows environment is Win 7 64, with SP1 applied.

    I've installed the following VS Workloads:

    .NET desktop development

    Desktop development with C++

    Universal Windows Platform Development


    The first error I had was the "unhandled exception code 0xe0434352", which I can see others have encountered before (but I've not found how it was resolved) I tracked this to the attempt to read the registry, which starts at line 360 in AssertToolSet.mki. My solution, rightly or wrongly, was to hard code the VS path into the environment variable, so I now have:

                    SetTheVar:
                        ~@putenv VS2017Dir="C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/"    # HARD CODE VS PATH
    #                    ~@putenv VS2017Dir=$(VSProductDir)/

    Next error was

    Macro (VCVarsQueryRegistry2017.mki:94): VS2017_DotNetToolsDir=$[@realpath $[@registryread "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools", "InstallationFolder"]]
    BMAKE: Error - Cannot find the .Net tools location for this toolset. VS2017_DotNetToolsDir was not defined, and registry lookup failed.
    BMAKE: call trace
        line:   96, D:\PROGRA~1\Bentley\MICROS~2\mki\VCVarsQueryRegistry2017.mki
        line:  960, D:\PROGRA~1\Bentley\MICROS~2\mki\AssertToolSet.mki
        line:  114, D:\PROGRA~1\Bentley\MICROS~2\mki\ConfigurePolicy.mki
        line:   26, D:\PROGRA~1\Bentley\MICROS~2\mki\mdl.mki
        line:   17, D:\PROGRA~1\Bentley\MICROS~2\examples\Elements\exampletool\exampletool.mke

    Examining the registry showed I have ...NETFXSDK\4.6.1\... and ...NETFXSDK\4.7.2\... , but not the 4.6.2 entry others have found, this could be owing to the very recent version of VS I've installed.

    Edited lines 94 & 101 in VCVarsQueryRegistry2017.mki, changing 4.6 to 4.7.2 in both cases.

    I'm now left with the third error:

    Macro (AssertToolSet.mki:975): TOOL_VERSION=14.16
    BMAKE: Error - ToolSet version 14.16.XXX is required (version found= )
    BMAKE: call trace
        line:  979, D:\PROGRA~1\Bentley\MICROS~2\mki\AssertToolSet.mki
        line:  114, D:\PROGRA~1\Bentley\MICROS~2\mki\ConfigurePolicy.mki
        line:   26, D:\PROGRA~1\Bentley\MICROS~2\mki\mdl.mki
        line:   17, D:\PROGRA~1\Bentley\MICROS~2\examples\Elements\exampletool\exampletool.mke


    Judging by the output, it isn't finding any version (I found another post where this error had occured but in that case a version was found).

    The 'Microsoft.VCToolsVersion.default.txt' file, which seems to be what bmake is looking for, is present in specified location and contains "14.16.27023" which, on the face of it, should match.


    Any suggestions as to where I go from here?

    Thanks,

    Simon.






Children