How To get project's options using code
How To get project's options using code
How can I get the selected Build Configuration (and other project options) for my Ranorex Project, using Code?
Re: How To get project's options using code
Hello
While you can get all the project properties via the MSBuild API, there is no helper functions to help with this in Ranorex. Furthermore, I'm not sure but that sounds like it would fall out of the scope of a Ranorex topic and more or an MSBuild question.
What exactly are you trying to achieve?
While you can get all the project properties via the MSBuild API, there is no helper functions to help with this in Ranorex. Furthermore, I'm not sure but that sounds like it would fall out of the scope of a Ranorex topic and more or an MSBuild question.
What exactly are you trying to achieve?
Normal people... believe that if it ain't broke, don't fix it. Engineers believe that if it ain't broke, it doesn't have enough features yet.
-Scott Adams
-Scott Adams
Re: How To get project's options using code
I'm trying different solutions to automatically load a specific Excel data file, according to the configuration in which the test is Builded and executed. So rather than checking the machine on which the build is created, I would like to check the build configuration.
If the configuration is Debug, then the data file to be loaded is in a development context and is different for each dev team. If the configuration is Release, the data file to be loaded is a common production data file, used by TeamCity.
I think the simplest way is to use the Pre-Build Event command Line, but as I said, I'm trying different solutions ...
If the configuration is Debug, then the data file to be loaded is in a development context and is different for each dev team. If the configuration is Release, the data file to be loaded is a common production data file, used by TeamCity.
I think the simplest way is to use the Pre-Build Event command Line, but as I said, I'm trying different solutions ...
Re: How To get project's options using code
Do you run your test from command prompt?
Just an idea if you do:
Create a global variable and pass the variable in the command line.
Example:
KeePassTestSuite.exe /pa:GlobalRunConfiguration=Debug /rc:Debug
And inside you can check that variable and load the specific excel file.
But I would love to know if you can get the value during the execution. Please let us know if you find an answer
Just an idea if you do:
Create a global variable and pass the variable in the command line.
Example:
KeePassTestSuite.exe /pa:GlobalRunConfiguration=Debug /rc:Debug
And inside you can check that variable and load the specific excel file.
But I would love to know if you can get the value during the execution. Please let us know if you find an answer