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
  • Hi Larry,

    just did quick analysis (fulltext search, nothing special ;-):

    VS2017_DotNetToolsDir is defined in VCVarsQueryRegistry2017.mki in this way:

    %if !defined (VS2017_DotNetToolsDir)
        VS2017_DotNetToolsDir= $[@realpath $[@registryread "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6/WinSDK-NetFx40Tools", "InstallationFolder"]]
        %if $(VS2017_DotNetToolsDir) == " "
            %error Cannot find the .Net tools location for this toolset. VS2017_DotNetToolsDir was not defined, and registry lookup failed.
        %endif
    %endif

    Based on used registry key, maybe you have not NET 4.6 installed, but only e.g. 4.6.2, so the registry key is not found?

    On my computer, I see these definitions:

    • For 4.6, folder is C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\
    • For 4.6.1, folder is C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\
    • For 4.6.2, folder is C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\

    I think it's bug, because when SDK requires NET 4.6.2, it should use tools from 4.6.2 and not 4.6.

    If you will confirm there is no registry key for 4.6, I assume you can modify VCVarsQueryRegistry2017 to check for 4.6.2.

    With regards,

      Jan

  • Jan,

    I have 4.6.1 and 4.6.2 installed but NOT 4.6.

    Larry

  • I have 4.6.1 and 4.6.2 installed but NOT 4.6.

    Ok, so it's probably the reason.

    But it's bug in SDK, because Update 12 prerequisities are defined as "NET 4.6.2" and there is no requirement to have NET 4.6 installed together with 4.6.2.

    A quick fix is to modify the mentioned mki file.

    With regards,

      Jan

  • Jan,

    I made the change you suggested and now I get a different error from VcVarsQueryRegistry2017:

    Cannot find the .Net framework 64-bit version for this toolset. VS2017_FrameworkVersion64 was not defined, and registry lookup failed.

        %if !defined (VS2017_FrameworkVersion64)
            VS2017_FrameworkVersion64=$[@realpath $[@registryread "HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/Microsoft/VisualStudio/SxS/VC7", "FrameworkVer64"]]
            %if $(VS2017_FrameworkVersion64) == " "
                %error Cannot find the .Net framework 64-bit version for this toolset. VS2017_FrameworkVersion64 was not defined, and registry lookup failed.
            %endif
        %endif

  • It seems something more (another installation) is required. I am not sure what SxS registry key belongs to what Visual Studio component.

    I guess should be able to provide more details.

    Regards,

      Jan

  • You can also check in VS2017 installer whether you have all installed modules, mentioned in SDK annoucnement, really installed. Personally I really hate it, because every module / group represents a bunch of individual components, so why to don't specify exactly what components are required?

    My feeling is that missing registry is caused by some VC or VS tools component, not NET.

    Regards,

      Jan

  • Hi ,

    Both you and Jan (thank you btw.) are certainly in the correct area of "the problem".  It appears in VcVarsQueryRegistry2017.mki on line 141 your value for the VS2017_FrameworkVersion64 is not returning an expected value or " " (also expected).  So, in trying to cut to the chase, do you mind providing me an export of your registry key in question using this (slightly long) key-in from your developer shell?

    reg EXPORT HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VC7 %temp%\%COMPUTERNAME%-VS-SxS-VC7.txt & start explorer.exe /e, /select,%temp%\%COMPUTERNAME%-VS-SxS-VC7.txt

    Presuming the VC7 path exists it should export the key values into a .txt file and open Explorer w/the file hilighted so you can pass it along for review.

    Thank you,
    Bob



  • Robert,

    I get an error when I run this script:

    ERROR: The system was unable to find the specified registry key or value.

    Larry

  • If I look at the registry itself, I can see that the value is set to 15.0.

  • Hi ,

    Ok, as I suspected Microsoft Visual Studio "VC" entry is no longer present to detect and locate the appropriate Microsoft .NET Framework versions in the default windows locations.  Like mine below.  Coincidentally, I was already looking into these entries for two future advancements/opportunities for two proposed upcoming SDK changes.  For now (just for the MSCE SDK U12 release), do you mind downloading the attached .txt file, rename it to .reg so it can create a couple focused "missing registry entries" the SDK is expecting?  They add the highlighted entries below and should correct the problem you are seeing.  Please let me know if it helps resolve the issue.

    Thank you,
    Bob

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VC7]
    "FrameworkDir32"="C:\\Windows\\Microsoft.NET\\Framework\\"
    "FrameworkDir64"="C:\\Windows\\Microsoft.NET\\Framework64"
    "FrameworkVer32"="v4.0.30319"
    "FrameworkVer64"="v4.0.30319"
    
    



Reply
  • Hi ,

    Ok, as I suspected Microsoft Visual Studio "VC" entry is no longer present to detect and locate the appropriate Microsoft .NET Framework versions in the default windows locations.  Like mine below.  Coincidentally, I was already looking into these entries for two future advancements/opportunities for two proposed upcoming SDK changes.  For now (just for the MSCE SDK U12 release), do you mind downloading the attached .txt file, rename it to .reg so it can create a couple focused "missing registry entries" the SDK is expecting?  They add the highlighted entries below and should correct the problem you are seeing.  Please let me know if it helps resolve the issue.

    Thank you,
    Bob

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VC7]
    "FrameworkDir32"="C:\\Windows\\Microsoft.NET\\Framework\\"
    "FrameworkDir64"="C:\\Windows\\Microsoft.NET\\Framework64"
    "FrameworkVer32"="v4.0.30319"
    "FrameworkVer64"="v4.0.30319"
    
    



Children