Adding code modules programmatically to Ranorex
Posted: Fri Nov 15, 2019 9:09 pm
Hello,
Lately I’ve been working on generating simple code modules which do simple things for our automations. I have no issues adding them to the Visual Studio solution but once I try to run them in ranorex I get the Module Could Not Be Found error. I was wondering if anyone has a potential fix for this.
The only potential fix we have found it adding them through the editor but Ranorex doesn’t have an add folder which adds everything in it or a copy/add all button, it makes it so we have to spam a button which kinda defeats the point of doing this programmatically.
If anyone has any information that could help me out it would be greatly appreciated.
Thank you,
Lex
Edit: I’ve found the answer for anyone else who runs into this problem in the future. Surprisingly the missing module has nothing to do with ranorex. In the .csproj file when you use Microsoft.Build.Evaluation.Project.AddFile it doesn’t automatically tag your objects to be compiled. I’ve written something that simply edits the the .csproj file now.
Lately I’ve been working on generating simple code modules which do simple things for our automations. I have no issues adding them to the Visual Studio solution but once I try to run them in ranorex I get the Module Could Not Be Found error. I was wondering if anyone has a potential fix for this.
The only potential fix we have found it adding them through the editor but Ranorex doesn’t have an add folder which adds everything in it or a copy/add all button, it makes it so we have to spam a button which kinda defeats the point of doing this programmatically.
If anyone has any information that could help me out it would be greatly appreciated.
Thank you,
Lex
Edit: I’ve found the answer for anyone else who runs into this problem in the future. Surprisingly the missing module has nothing to do with ranorex. In the .csproj file when you use Microsoft.Build.Evaluation.Project.AddFile it doesn’t automatically tag your objects to be compiled. I’ve written something that simply edits the the .csproj file now.