Cannot build Visual Studeo 2019 project for the very first time with Torizon extension

I was following the Quickstart to build and run my first C application, refer to Build and Run your First C Application

This is TorizonCore my COM is running on:
colibri-imx6-10638900:~$ cat /etc/os-release
ID=torizon-upstream
NAME=“Torizoncore Upstream”
VERSION=“5.1.0-devel-202011+build.4 (dunfell)”
VERSION_ID=5.1.0-devel-202011-build.4
PRETTY_NAME=“Torizoncore Upstream 5.1.0-devel-202011+build.4 (dunfell)”
BUILD_ID=“4”
ANSI_COLOR=“1;34”
colibri-imx6-10638900:~

In STEP 14, when I left clicked on the line number, the breakpoint does not show. I proceeded the steps anyway.

In STEP 15, after clicking on Yes to build the project, I didn’t see the expected expected output result. Instead, snapshot attachedlink text was what I got. And I’m at a loss to fix the issues.

Thanks in advance for your help,

Michael

Extraction from the output window of the VS2019:
Error running SDK container.
Code: 500
Description: Internal server error
Message: (109, ‘ReadFile’, ‘The pipe has been ended.’)
Error starting SDK container.
Download completed.
Error running SDK container.
Code: 500
Description: Internal server error
Message: (109, ‘ReadFile’, ‘The pipe has been ended.’)
Error starting SDK container.

link text

link text

Greetings @MichaelFang,

This is a known issue that came to our attention recently. It seems that perhaps something in the latest version of Visual Studio may have broken compatibility with our extension. We’re still investigating, but you could provide what version of Visual Studio you are using?

Best Regards,
Jeremias

Visual Studio Professional 2019
Version 16.7.7

Visual Studio Professional 2019
Version 16.7.7

Thanks,
Michael

I posted a similar but different issue with VS 2019 and Torizon to https://www.toradex.com/community/questions/57396/unable-to-create-visual-studio-2019-project-with-t.html?childToView=57397#answer-57397.

Greetings @MichaelFang,

We believe we may have fixed the issues with the extension. However it will take some time to validate and test these fixes. If you’d like to work with these fixes, you can have access to them by installing the early access version of the extension from the Visual Studio marketplace.

Since this is an early access version some things may look different then how it’s currently documented but the process should still be the same. Also as can be expected from early access there may be some bugs here and there still present. Apologies for the inconvenience.

Best Regards,
Jeremias

Hi Jeremias,

I went to the Visual Studio marketplace site, which has only one download green button without choices of versions. I clicked the download button any way and received the TorizonVSExtension.vsix. Upon executing the vsix, it gave me an error message saying “The extension is already installed to all applicable products”. I went ahead create new project in Visual Studio (while Torizon device connected/detected). Received the same error output as before when doing “deploy …”.

Please give me a link that give me access to this “early access version of the extension from the Visual Studio marketplace”.

Thanks,
Michael

The early access version of the extension is listed as a completely different extension since that was the only way we could do it while keeping the two version separate.

So this is the normal extension: https://marketplace.visualstudio.com/items?itemName=Toradex.torizon

This is the early access one you should try: https://marketplace.visualstudio.com/items?itemName=Toradex.torizon-early-access

Best Regards,
Jeremias

Hi Jeremias,

1: I got the latest/early access Torizon extention for VS 2019 on 1/11/2021 through the web site
https://marketplace.visualstudio.com/items?itemName=Toradex.toradex-torizon-ccpp-support-early
The link you gave me on Dec.07 seems to be applicable to Visual Studio Code)
2. After downloading I ran the TorizonVSExtension.
3. Power up my imux6DL evaluation board.
4 Brings up visual studio 2019, and then choose connecting without code. (Note that the version of my
VS2019 is Version 16.7.7 of MS Visual Studio Professional 2019)
5. Click on Tools → Torizon: Download/update base and sdk containers
5. VS2019 detects my device, Colibri imx6/DL, without problem.
6. I create a new project and then I hit the green arrow in Torizon task bar to run.
I got the output pan as shown attached below; the green arrow remains dimmed and the debugger never hits of the breakpoints, nor the console displays any printf outcome. I have mo idea what is going on and how to proceed.
(Then I hit the green arrow in front of my device IP address, 10.10.10.29. Got the same outcome as step 6; and the green arrow remains dimmed)link text

Actually since I messaged you a month ago we’ve done a recent release of the IDE extensions. You should be fine on the stable version of the extension now (V1.3.0).

Though in any case the usual procedure worked on my setup and I didn’t experience the issue you mentioned. When you hit the green arrow it should’ve started building your application and then deploy to the device of your choice. Did it not do that? Or did it immediately go to the output you attached?

Also can you toggle the output window to show something other than “Torizon Build” Is there no other output option?

Also some of your debug configurations seem odd. For example the IP address nex to the green arrow should be your localhost i.e. 127.0.0.1. Also the arch should be x64, don’t worry the extension handles the conversion to ARM. It’s hard to tell what else might off from just that screenshot.

One thing you can do is turn on the debug Window for our extension. This can be done by going to Visual Studio and, Tools > Options > Torizon > Show backend console > True. Once that has been set and applied, restart Visual Studio and there should now be a command prompt window that shows all the API calls made by our extension. You might also need to use task manager to end the moses.exe task so the extension backend can fully reload with the new debug settings.

Once the window is open try running through the entire process again. Then when you hit the issue copy and paste all the contents of the debug window back to me. Please copy and paste, no screenshot as it’s harder to parse through text.

Best Regards,
Jeremias

Hi Jeremias,

As I mentioned earlier that I donwloaded the early access version of extension on 1/11/2021 and it ran into a problem that spells like skipping deploy when running debugger.
Per you recommendation on 1/12 that “You should be fine on the stable version of the extension now (V1.3.0).” I use the link for Visual Studio Marketplace provided in STEP 2 of the tutorial page Build and Run your First C Application. Which led me to https://marketplace.visualstudio.com/items?itemName=Toradex.toradex-torizon-ccpp-support page (Don’t know why it mentioned Visual Studio 2017 on the page).
Anyway, I ran the downloaded TorizonVSExtention and the install failed. Attached please find the install log. In which the last line says, “Install Error : System.InvalidOperationException: Cannot find setup engine instance.”

I hope this is something fixable or can be ignored.

I’m going to proceed creating a new project for C/C++ in VS2019 to answer your questions as it goes (before I hear from you.) Thanks!

Wait so the extension install failed? What happens if you try and install the extension from Visual Studio via the extensions manager?

Hmm this is odd, on my setup I have no issues install and reinstalling the extension. The only difference being my Visual Studio is version 16.8.2. Perhaps updating may help your situation.

Best Regards,
Jeremias

Good news, Jerimias!
When I brought up VS2019, it says that the Toradex Torizon C/C++ supprt Early Access, v1.3.51 is not responding and asks me if I want to disable it. So I did.
I went into Extensions Manager and saw that v1.3.0 is the only one enabled.
Then I selected Tools > Download/update base and sdk containers. Thing just went as expected all the way to the end of this lesson. I was able to run the debugger, hit the brakpoint, and see the printf outcome.
Thank you very much for your support and patience.

One last question before I close this case - is it safe to uninstall on the Torizon Extension early accesss, v1.3.51 through Extensions Manager?

Good news!

When I brought up the VS 2019 after installing version 1.3.0 seemed to have failed, it says that the Torizon Extension Early Access version 1.3.51 is not responding and asks if I want to disable it. So did I.

I went to Extensions Manager in VS2019 and saw that version 1.3.0 is enabled (maybe the installation actually did not fail when declared failed?) and version 1.3.51 is disabled. After running Tools → Torizon: Download/update base and sdk containers, from there, things ran smoothly; Running “Debug > Deploy and debug Torizon application” went just about what described in the “Build and Run your First C Application” tutorial.

One quick question before I close this case -
During building the project for the first time, I saw in the Build output pane, there was a warning line:

1>—> [Warning] The requested image’s platform (linux/arm) does not match the detected host platform (linux/amd64) and no specific platform was requested

This raises a concern to me whether this warning will come back and haunt me especiailly when I read in Module 3, Writing Your First Dockerfile, that “It is important to set the platform correctly, otherwise when you deploy it to the board, the container may not work or malfunction” (on the FROM statement).

Thanks for your support and patience

Glad everything worked out for you. I suppose it was just a case of some older configurations confusing the system, but it seems like you were able to reset everything to a correct state.

As for your final question, yes the extension manager should be safe to use to uninstall/install our extensions. At least it’s what I use in my case and I’ve yet to have any issues.

Best Regards,
Jeremias

It’s safe to disregard that warning, it’s a known issue and shouldn’t prevent the extension from working properly. In fact we plan to adjust the extension in the future so that this warning no longer appears. But please inform us if you do run into issues and you believe it to be related to this warning message.

Best Regards,
Jeremias