Hi,
We want to inspect our code using ReSharper command-line tools.
So we have created a PowerShell script that can execute it.
But we need to do it manually after we build the project.
We want to somehow execute the PowerShell script when we build the solution from Ranorex Studio (after the build action).
I found in options some external tools section, but I don't know if this could help:
Is it possible to configure Ranorex Studio to do it automatically after the build action was made?
Thanks in advance!
Execute external tool\script when building the project in Ranorex Studio
-
- Posts: 21
- Joined: Mon Mar 30, 2020 2:10 pm
Execute external tool\script when building the project in Ranorex Studio
You do not have the required permissions to view the files attached to this post.
Re: Execute external tool\script when building the project in Ranorex Studio
Hi,
You can define pre/post build events in the project properties, as shown here: Just right-click a project and form the appeared menu select Properties >> Build events tab. Hope this helps?
You can define pre/post build events in the project properties, as shown here: Just right-click a project and form the appeared menu select Properties >> Build events tab. Hope this helps?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 21
- Joined: Mon Mar 30, 2020 2:10 pm
Re: Execute external tool\script when building the project in Ranorex Studio
Hi odklizec,
I have tried to add a call of a bat file that would execute the PowerShell script with parameters.
But nothing happened when I had built a solution.
I have tried to add a call of a bat file that would execute the PowerShell script with parameters.
But nothing happened when I had built a solution.
You do not have the required permissions to view the files attached to this post.
Re: Execute external tool\script when building the project in Ranorex Studio
What is the 'call' thing for? Just a full filename to the batch file should be sufficient. You can also increase MSBuild verbosity to see more output, which may help diagnose this post build step.
Re: Execute external tool\script when building the project in Ranorex Studio
Hi,
I just tried it and it definitely works. I guess the problem in your case is this...$(SolutionDir)
Just try to replace this 'variable' with absolute path.
I just tried it and it definitely works. I guess the problem in your case is this...$(SolutionDir)
Just try to replace this 'variable' with absolute path.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Execute external tool\script when building the project in Ranorex Studio
$(SolutionDir) is fine, it's a well-known MSBuild variable. We do similar things in our Ranorex solutions e.g.:
You can acquire a list of MSBuild variables from Visual Studio easily enough, or gander the MSBuild output in a higher verbosity. I can't recall if SolutionDir has a trailing path separator on it or not.
Code: Select all
"$(TargetFrameworkSDKToolsDirectory)TlbImp.exe" parameters_go_here
Re: Execute external tool\script when building the project in Ranorex Studio
Hi Stub,
You are right. $(SolutionDir) works fine. So the problem must be in Andrii's bat/powershell.
You are right. $(SolutionDir) works fine. So the problem must be in Andrii's bat/powershell.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 21
- Joined: Mon Mar 30, 2020 2:10 pm
Re: Execute external tool\script when building the project in Ranorex Studio
I have created a new project just for the check. As you can see no TEST value in build logs:
You do not have the required permissions to view the files attached to this post.
Re: Execute external tool\script when building the project in Ranorex Studio
I'm not quite sure that echo is displayed in output tab. Just create a simple test.cmd with single line notepad.exe. Then place this bat file to solution dir (where rxtst is located) and call it with this command in PostBuild action... "$(SolutionDir)test.cmd".
After build, notepad.exe should be started (as it does for me).
After build, notepad.exe should be started (as it does for me).
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Execute external tool\script when building the project in Ranorex Studio
Have you adjusted the MSBuild output verbosity?
Re: Execute external tool\script when building the project in Ranorex Studio
I'm also curious about MSBuild output verbosity