I have a powershell script in Visual Studio Build, and I wanted to get the build number to be passed as argument.
Using the below arguments, this doesnt pass the build number but it passes as a literal word.
Please help in getting the build number to be passed as argument. Thank you in advance.
I'm using TFS 2015.
I have already solved this issue. I created a new variable in the variables tab and pass the value of the build number.
And then I set it as an argument in the PowerShell script.
This solves my problem :)
Related
Visual Studio provides the option of running internal commands as specified here using a Command Console. It provides also the option of assigning aliases to commands (mostly to reduce the number of keystrokes). I found also ConcatCommands extension, which provides the option of concatenating the execution of more than one command. Now my interest focuses on assigning shorcuts to a command alias, but I haven't found a way of doing it yet, and I don't know if its even possible.
Does anyone in the room knows if its possible assigning a key shortcut to a Command alias in Visual Studio?
Many thanks
You can use my Visual Commander extension. It supports executing a command alias, e.g. DTE.ExecuteCommand("of"); for File.OpenFile, concatenating the execution of more than one command, and assigning a shortcut to a Visual Commander command.
I wanted to use the $(SolutionDir) macro in my C# project on Properties->Debug and then Start action in Start external program:
But I get the error message:
I am sure the Path would be valid, if the $(SolutionDir) macro gets translated. If I use the absolute Path it works also.
Any suggestions or smaller work arounds to solve this problem?
Maybe someone wants to ask, why I want to solve this? Because I have multiple releases of one project at different folders. If I change the release folder (open another solution) I have to manually change the external program. It would be nice, if I could make the path to the external program dependent on the current opened solution.
Thanks!
I guess it is because of that $(...) the round bracket
change it to ${...} the curly bracket
visual studio file system does't work using () it by default using {}
I am trying to remove some of the returned arguments of a function called at multiple places in my working pipeline with PyCharm. PyCharm allows me to do this only for input arguments (via Refactoring -> Change Signature) but I am struggling to find a way to automatically do the same for returned arguments.
So far, my only solution is to find the usages of the function and to delete by hand the output parameters at every single call...
I will be happy if anyone can help.
I am using PyCharm Community Edition 2016.3.2
For my work I have to define a pre build event in a powershell script, which will be added to the target project that I install the NuGet package in. The script installs fine the first time, the pre build event is being added the right way like this:
xcopy $(SolutionDir)Some\Path $(ProjectDir)Some\Other\Path
When I uninstall and install my NuGet package again, the existing pre build events are being requested from the target project. The problem is that when an environment variable like $(ProjectDir) or $(SolutionDir) is being used in the pre build event, my powershell script gets the value that is associated with the variable. Like so:
c:\Path\To\Solution\Dir
or:
C:\Path\To\Project\Dir
But I want it to give me the string with the env variables in it.
How can I get the literal value from the pre build events in powershell?
Tim
UPDATE::
I have done a little more research and concluded that the environment variables in the build events won't be replaced UNLESS it is a Windows Installer project.
How to get literal string value of Project Pre Build Event property
AFAIK, you can't get literal string value of Project Pre Build Event property. Because Macros are expanded by the Preprocessor, which happens even before the code is compiled. It is a purely textual replacement.
Hopefully someone could help me here with following problem – tried to find a solution for this for weeks but unfortunately wasn’t able to find one.
I am using IzPack (recently updated to 5.1) as an installer for a software package. This package contains multiple executable files (bash scripts) which use variables inside. These variables are filled with values provided by the user during the installation process (user input panel).
The problem I have is that all these values get substituted in the bash-file if it is marked as “parsable” – otherwise (if not marked as “parsable”) the values are not substituted but it is not possible to access them during script execution. I have to access the values of these variables but it is no option for me to substitute them in the bash scripts because these files are not deleted after the installation is done and have to stay on the disk. In case of variable substitution all variables, also passwords, are substituted and could be seen by everybody, having read access to the file, in plaintext.
Has anyone got a solution or idea how this could be achieved using izPack? I also thought about encrypting the passwords – there exists a processor for it in izPack but unfortunately no documentation.
Thanks in advance
How about sanitizing or removing the files in question using the ProcessPanel?
This is typically run after the InstallPanel and before the installation is finished.