locked
Create a build using powershell RRS feed

  • Question

  • Hi all I would like to create a build for a visual studio (winfroms application), can some one help me. I would like to achieve this by writing a script in powershell so that when ever I executed the script it should load all the dependencies and create a build accordingly.
    • Moved by Bill_Stewart Wednesday, October 5, 2016 10:09 PM Unanswerable drive-by question
    Thursday, July 21, 2016 10:50 AM

All replies

  • PowerShell is not the tool for this.  Post in the VS forum for help on how to do a build from a command line.  There are a few tools and methods that can do this. "msbuild", "nmake", nd others.

    \_(ツ)_/

    Thursday, July 21, 2016 11:01 AM
  • Download entire solution or specific branch from TFS to local folder

    Tried the following to download a file

    cls
    $tfsCollectionUrl = New-Object System.URI("http://localhost:8080/tfs/defaultcollection");
    [Microsoft.TeamFoundation.Client.TfsTeamProjectCollection] $tfsCollection = Get-TfsServer $tfsCollectionUrl
    $VersionControl = $tfsCollection.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer])
    $DestinationFile = [IO.Path]::GetTempFileName()
    $VersionControl.DownloadFileByUrl('$/MyFirstProject/WebApplication1/WebApplication1/WebForm1.aspx.cs', $DestinationFile)
    
    Invoke-Item $DestinationFile

    Also this is not checking whether he is having permission to download , I would like to prompt for username and password instead of downloading directly. Can I achieve the same for bitbucket too if so how can I achieve it

    Friday, July 22, 2016 8:26 AM
  • For issues of how to use custom clients and assemblies it is usually best to post to the owner site or to search for answers.  This a scripting forum and not a How to" for every subsystem.  You are asking a very subsystem specific question.  Save time and ask the owner/author.

    Her is an example of a solution using my methods.  There are others that may even be better:

    https://rafpe.ninja/2015/08/26/powershell-connect-to-tfs-wiith-alternative-credentials/


    \_(ツ)_/

    Friday, July 22, 2016 10:44 AM