I'm trying to build the ManagedSDKExample in VS, but I get CS0246 errors on multiple .cs-files for PointEntity2dInPlan. Any idea what's causing this?
Hi Juho,
please follow the best practices and specify used product, its version (build number) and also SDK version.
Juho Selenius said:Any idea what's causing this?
Did you start Visual Studio from SDK shell?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
I'm sorry. I'm using ORD CE 2021 R1, ORD CE 10.10 SDK and VS2022. I've tried starting from the SDK shell and as described in this video: https://communities.bentley.com/products/programming/civil_programming/w/wiki/59590/video-simple-way-to-get-started.
Both ways I end up with the same result.
Hi Bob,
thanks for the tips.
If I run the same steps, these are my results:
I also noticed now that there's a message about .NET framework when I start bmake:
-Juho
Hi Juho Selenius,
You may want to set your OBD Developer Shell (short cut properties) to Run As Administrator.
Yellow text is like a warning wrt elevation status, where if running as admin you should see White text in your shell (like my image).
Please give that a try and let us know if that helps resolve the issue or you need further help.
Thank you,Bob
Hi,
I get the same results running the shell as admin.
Unfortunately it appears the OBD SDK does not pull the latest changes from the MicroStation CONNECT Edition SDK development environment (is a point in time static snapshot - out of sync w/the latest changes) and does not provide a "build verbose" option.
Given that difference you can approximate the (missing) "build verbose" functionality by doing these steps:
set > %temp%\build.txt & doskey /macros >> %temp%\build.txt & bmake +avilC ManagedSDKExample.mke >> %temp%\build.txt
HTH,Bob
here's the build log:
build.zip
Around line 793 the make environment is attempting to locate a 64-bit .NET 4.6.2 framework that is required and appears not to be present.
Macro (VCVarsQueryRegistry2017.mki:135): VS2017_FrameworkVersion64=$[@realpath $[@registryread "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VC7", "FrameworkVer64"]] [C:\PROGRA~1\Bentley\OPENRO~2\mki\VCVarsQueryRegistry2017.mki], line 136, Conditional open, level = 2. Macro (VCVarsQueryRegistry2017.mki:137): VS2017_FrameworkVersion64=v4.0.30319 Cannot find the .NET framework 64-bit version for this toolset - using default: v4.0.30319
Can you open the Visual Studio Installer ("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe") and check your VS2017 configuration (all components) to see if you have the ".NET Framework 4.6.2 SDK" option checked?
If by chance this option is checked can you Run (make take a moment to run) and Zip the following command output for me to review/compare against my configuration?
wmic /namespace:\\root\cimv2 path win32_product where "name like '%Microsoft .NET%'" get Name, Version
The other thing we could compare rather quickly would be the VS Installer Configuration (XML .vsconfig file). Click More > Export Configuration. I am attaching mine for your reference. I suggest only focusing on the .NET related items checked since I have additional features checked/installed and my VS2017 likely has more options above and beyond the default VS Workload Requirements.
BentleyOBDSDK-VS2017.zip
Thank you and HTH,Bob
the option was checked so I ran the command and here's the output:
VersionListing.zip
I also checked the VS Installer configuration and out of the .NET related items only ".NET Framework 4.7.2 SDK" was missing comparing to your config, but adding the component didn't solve the problem.
Same issues with me. need help