Automates TwinCAT XAE projects by opening solutions, activating configurations, and starting the TwinCAT runtime.
- TwinCAT XAE Shell 17.0
- .NET Framework 4.7.2+
PlcTestSuite_Runner.exe <solution-file.sln> <project-name>Important: Run the executable from a subdirectory. The application looks for the solution file in the parent directory.
MyProject/
├── MyTwinCATSolution.sln
└── TestRunner/
└── PlcTestSuite_Runner.exe
cd MyProject\TestRunner
PlcTestSuite_Runner.exe MyTwinCATSolution.sln CoreProject- Opens TwinCAT XAE Shell
- Loads your solution (waits 50 seconds)
- Finds the specified project by name
- Activates configuration and starts TwinCAT runtime (waits 10 seconds)
# Debug
msbuild PlcTestSuite_Runner\PlcTestSuite_Runner.csproj /p:Configuration=Debug
# Release
msbuild PlcTestSuite_Runner\PlcTestSuite_Runner.csproj /p:Configuration=ReleaseOutput: PlcTestSuite_Runner\bin\[Debug|Release]\PlcTestSuite_Runner.exe
| Error | Solution |
|---|---|
| "Usage: PlcTestSuite_Runner.exe..." | Provide both solution file and project name as arguments |
| "COM Exception occurred" | Verify TwinCAT XAE Shell 17.0 is installed |
| "Project file not found" | Check solution file exists in parent directory |
| "[ProjectName] not found" | Ensure solution contains the specified project name |
MIT License - See LICENSE file for details.