Visual Studio error
So I'm (and some students of mine) having a problem with Visual studio where I'm not able to create any C++ projects. When I try to create a project for C++, after selecting the correct PLCnext controller I get the error "Value does not fall within the expected range".
The C# projects do work. I was able to create a library, add to a project and have it run on an PLCnext controller
For C++ I have tried the PLCnext Consumable Library and the PLCnext PLM Project and for C# I have tried the PLCnext C# Firmware Library.
versions:
- Visual Studio Community edition 2022
- PLCnext controller AXC F 2152 firmware 2024
- Toolchain version 2024
- SDK version 2023.6 (the wiki said to use 2023.6 until 2024 was released)
Thanks for the help in advance! Toon
This discussion has been closed.
Comments
This is a recently discovered issue when using the Toolchain with Visual Studio version 17.9.2 and newer. The problem is being investigated, and will hopefully be fixed in the next Toolchain version (2024.6).
As a quick workaround, you could start a project without a target and add a solution configuration manually named Project-specific”. After that, it should be possible to add targets to the project and work as usual.
Open the configuration manager:
Add a new configuration:
Name it “Project-specific” and uncheck the checkbox “Create new project configuration”:
P.S. Version 2024.0 is the current Toolchain version. That version, and all new Toolchain versions will be available here:
https://www.phoenixcontact.com/en-pc/products/software-package-plcnext-technology-toolchain-1639782
He Martin, thank you for your help! This fixed it.