Unable to build examples in SDK, Toolset Version, and just getting going

Trying to get going with Connect SDK and not having much luck:

First was getting missing .netfx toolset error, found the thread about .Net 4.6 needing to be installed, so I did, but that didn't create the netfx folder, so i modified the VCVarsQueryRegistry2017.mki file to look at 4.6.2 but now I'm getting:

BMAKE: Error - ToolSet version 14.16.XXX is required (version found=14.15.26726)

Can anyone help? 

Parents Reply
  • Hi Viktor,

    can you confirm whether the problem was solved or not?

    I do not like an approach "try to install / run something and hope it will solve the problem", especially when the source of the problem can be tracked and (usually ;-) solved.

    Openned SDK Command prompt as an administrator and ran BUILDALLEXAMPLES

    I think you should choose only 2 (simple) examples - one native and one managed - for testing.

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

    The message is clear and mki file emmiting this message can be easily found. Did you check the mki file how the mentioned toolset is located?

    Is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6/WinSDK-NetFx40Tools registry record defined? You can find plenty of discussions, not specific to MicroStation, about issues NET SDK registry problems.

    I have VS2017 Community Edition installed with all the latest updates.

    Well, you should be aware only Professiona and higher (which means Enterprise) version is supported officially. But in fact the discussed issue is not about Visual Studio at all (even about used version, not only about its variant), but about NET SDK, which is independent from Visual Studio (but optionally installed together with VS).

    I didn't have .net 4.6

    To have NET SDK 4.6 installed is required for Update 12, which is (as discussed already) identified bug, because 4.6.2 is required for MicroStation itself.

    Well, I did install 4.6 Framework... but for some reason it doesn't come with SDK

    NET Framework and NET SDK are two very different things and as developer you have to be aware of the differences!

    can't seem to find how and where to get the 4.6 SDK

    What about this page? There are plenty of documentation about NET Framework, NET SDK, available variants and how to install them (including explanation of a bit confusing terminology), I recommend to read this one.

    Another question, if I put the examples aside, am I going to need 4.6 tools in order to compile a .net API Connect app?

    This is good question, but new one, so you should ask in a new post!

    But anyway: It seems there is a lack of knowledge what are roles of NET Framework, NET SDK, Visual Studio, MicroStation SDK shell and how managed addins work. And, strictly evaluated, the question is wrong and makes no sense, because you do not compile NET API, but MicroStation NET addin.

    You do not need anything except NET 4.6.2 SDK to create addin for MicroStation CE U12. No Visual Studio, no shell, just SDK, Notepad and Windows command promopt (dos sheel). Anything else is just a tool (enhancement) that makes the development process easier.

    To use properly configured VS C# class project is enough, there is only one exception: XCommands that I think can be implemented using MicroStation SDK tools only, but they are not mandatory for addin class.

    With regards,

      Jan

Children
  • Thanks again Jan. I may have not explained the problem clearly, but I do understand the difference between the sdk, framework, visual studio as the tool and microstation API. When I was referring to 4.6 Tools, I was referring to the NETFXSDK\4.6/WinSDK-NetFx40Tools, not Visual Studio. For me the tools are installed here:

    C:\Program Files (x86)\Windows Kits\NETFXSDK

    The real problem here is that .mki file is requiring an SDK tools of 4.6 to be installed, but even in the links you have provided, 4.6 SDK does not get installed. I have 4.6.1, 4.6.2, 4.7.1 and 4.7.2 installed. And even though I installed Developer Tools and runtime for 4.6, its still not installing the SDK tools in that folder. 

    I understand that I don't need to compile any of the examples to build my own add-in, but it would be helpful to at least see one plug-in source code running.

    Speculation here, but if you have the 4.6 Tools folder on your machine, is it possible that your machine was a windows 7 or 8 machine that was upgraded to windows 10? 

  • Hi ,

    We noticed a few inconsistencies in latest U12 make includes specific to the detection of VS2017 and requirements.  We believe we have isolated issues some of our users have been experiencing and we should have these inconsistencies addressed in time for the MSCE SDK U13 release.  Please allow me a day or so to collate the issues, ensure each are filed to be fixed (asap) and provide a blog or wiki showing  what changes may be required as a temporary work-around until the U13 release.

    Specific to your original ToolSet error below (requiring 14.16 vs 14.15 found), I suspect you have and earlier version of VS2017 installed and running: Help > Check for Updates; may address that issue properly.

    BMAKE: Error - ToolSet version 14.16.XXX is required (version found=14.15.26726)

    HTH and thank you,
    Bob



  • Thanks Robert. Yea, I updated Visual Studio after I posted the original question. Will wait for the workaround. Our of curiosity, when is U13 supposed to be released?

    Thanks.

  • Hi ,

    If you can provide the current (concise) error you are receiving and then provide me a "build verbose" log; simply type "build verbose" from the developer shell; and send me the output log I should be able to provide a quick recommendation.

    As for the release, we somewhat consistently release on a quarterly schedule.  So barring any unforeseen issues 3 months between releases is typical.  Here are the SDKAnnouncements as a reference target release time frame.

    Bob



  • Build Verbose.txt

    Do you need the whole thing? The first error pops up on line 1780.

  • Hi Viktor,

    For me the tools are installed here:

    What folder do you have under C:\Program Files (x86)\Windows Kits\NETFXSDK\?

    I have:

    The real problem here is that .mki file is requiring an SDK tools of 4.6 to be installed

    As Bob wrote, it's bug. In fact it does not require the installation, it only checks whether registry and folder exist. Consequently it means can (as discussed in another thread) to change .mki file check 4.6.1 or 4.6.2 to pass through this check.

    but even in the links you have provided, 4.6 SDK does not get installed.

    That's weird and out of my knowledge. But because I found quite a lot of dicussions about similar problems with different NET versions, I guess historically side-by-side installation contains some bugs (and NET.Core solves this problem differently ;-).

    but it would be helpful to at least see one plug-in source code running.

    I agree it's valid argument and it's good to see everything is working fine, but because there is no requirement to have running SDK shell to build pure managed addins, a question is whether to invest time to hack the installation or to wait to Update 13 where I guess this issue will be solved.

    one plug-in source code

    No such terminology is used in MicroStation development, please use correct one. When you write plug-in, you confuse all readers, because it's not clear what you are talking about.

    MicroStation CE applications can be:

    • Native code (C++) applications required to be compiled using VS2017 now.
    • Managed addins running "inside" MicroStation, written in any NET language (typically C#, but can be VB.NET, F#, IronPython...). Can be compiled by any compiler producing valid 4.6 CIL code.
    • External applications accessing to MicroStation through COM, written in  whatever language.
    • ... and as a subgroup, external applications accessing MicroStation through COM Interop wrapper around COM.
    Speculation here, but if you have the 4.6 Tools folder on your machine, is it possible that your machine was a windows 7 or 8 machine that was upgraded to windows 10? 

    Good question, but not. Except my main PC, I have also notebook where the latest Windows 10 were installed directly, so there is no history of older Windows. And NET 4.6 with all tools is installed and SDK shell works fine. Unfortunately I have no idea what software installed 4.6 tools, but I installed VS2005 (for V8i development), VS2015 (for older CE development) and VS2017 (for everything else). I think VS2015 was responsible for 4.6 tools installation.

    With regards,

      Jan

  • Hi Victor,

    A college has had some funny issues with 4.6.x. For some reason he did not have all 4.6. “packages” installed, but the 4.7.x already.

    He was no longer able to install the rest of 4.6. correctly Some MicroSoft-Installer issue.

    He had to deinstall all belonging to 4.7. And then he was able to install the missing 4.6 parts and afterwards the 4.7. - again.

    Now he could compile on V8 and CE.

    Sometimes you have to follow some magic rules :-)

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • Hi ,

    Could you provide a small screen shot/snip of regedit showing the locations under this key?

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK

    As mentioned there are a few issues that we see occuring (mostly on new/fresh VS installs) and for this I believe you many need to modify a line in the delivered .mki file (VCVarsQueryRegistry2017.mki:94) to point to "a higher" version than 4.6 that you have installed; like: 4.6.1 or 4.6.2 (preferred) if present.

    Please check and make the edit to the mki file, or send a screen shot/snip of the expanded location so I can try to help further.

    Thank you,
    Bob



  • See image of the registry. I have updated the lines 93-105 of  VCVarsQueryRegistry2017.mki to:

    %if !defined (VS2017_DotNetToolsDir)
    VS2017_DotNetToolsDir= $[@realpath $[@registryread "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1/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
    #introducing new variable as with 2017, microsoft further subdivided include folder with bin folder vs winsdk dir
    %if !defined (VS2017_DotNetWinSDKDir)
    VS2017_DotNetWinSDKDir= $[@realpath $[@registryread "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1", "KitsInstallationFolder"]]
    %if $(VS2017_DotNetWinSDKDir) == " "
    %error Cannot find the .Net tools location for this toolset. VS2017_DotNetWinSDKDir was not defined, and registry lookup failed.
    %endif
    %endif

    Anything else I need to update?

  • It does seem to work so far, I guess when I first tried making this change it wasn't sticking mainly because I was likely missing the C++ libraries or VS wasn't updated.

    Answer Verified By: Robert Hook