Search code examples
unit-testingtwincat

Linking Functional Block (FB) from development project to Testing Project -TwinCAT 3 - Beckhoff


I have created a testing project to run unit tests using TCunit framework and wanted to link files from development project worked by another colleague.
But there is only Add option when i right click on POU folder in solution explorer of TwinCAT.
When i did so, a copy of a file is made in testing project POU folder. Now I have two copies of same file i.e. in POU folder in testing project and POU folder in development project.
The problem i want to avoid is , if there are changes in the development project files i need to update POU folder in the testing project also manually.
Is there any solution to avoid the duplication?


Solution

  • I haven't tried this, but maybe you can try to make a hard symbolic link to the folder content you want in your test project. And then import the content from the symbolically linked folder into your test project.

    Edit 18 April 2020

    I made a small batch script to facilitate the hardlinking.