TFS run local process - visual-studio-2012

i have TFS express 2015 running on a local machine, i'm trying to get it to run a local process (a calculator window) as a second step after building.
i've tried command line, tried batch script and even tried powershell. the second step seems to go through just fine but no calculator is beeing opened.
is there anything i'm missing here? the TFS Express is installed on the same machine that runs visual studio.
please help!

For XAML build
If you want to open the local process (for example notepad) during Team Build, you need set your Build Service running as Interactively, launch your TFS Admin Console>>Build Configuration>>Build Service Properties>>Stop the service>>selected Run the Service Interactively.
Then you need to customize your build process template to create a InvokeProcess activity. You can use the InvokeProcess activity to start a process (run a program) on the build server. This activity is essentially a wrapper over Start. In your InvokeProcess activity, set FileName = “C:\Windows\notepad”.
After above two steps, you can open the notepad during Team Build. When running your build definition, the notepad will be opened on your build agent machine, and your build keeps on running this open notepad activity. You need logon your build agent using your TFS Build Service account, then you will see the notepad be opened on build agent machine, after you close this notepad, your build will continue run next steps.

Related

F5 Does not start debugging in Azure Cloud Shell

I am following the Azure learning path on Microsoft's website. One of the modules requires starting a node.js application with Azure Cloud Shell. I followed all the steps on the module with no issue, until trying to press F5 to start debugging. If I press F5 when the cursor is on the command line, ~ is added to the command line. If I press F5 when the cursor is not on the command line, the page just refreshed and I have to start over. I tried this on both Microsoft Edge and Chrome, both have the same behavior. Any idea on how I can start debugging? Desperate for help (Have to use Azure Cloud Shell in order to get access to the free azure resources)
This is the link to the learning module:https://learn.microsoft.com/en-us/learn/modules/automatic-update-of-a-webapp-using-azure-functions-and-signalr/3-exercise-analyze-limitations-of-polling-in-a-web-app?source=learn
I have tested the same in my VS Code and its working fine , Following are the steps to be followed to debug the function app that you have . And we can not debug by hitting F5 in our azure cloud shell.
By following MS DOC ,Hope you have already installed this in your local:
Node.js
Visual Studio Code
Azure Functions Core Tools
Azure Functions extension for Visual Studio Code
Azure Storage extension for Visual Studio Code
Azure Account extension in your VS Code.
And install GitBash in your local and turn on your IIS express from control panel . And
Then run the same command in your VS code and install NPM .
Go to Run & debug section as on screenshot and add one launch.json file and then hit F5 to debug your function app .
Here are some screenshots for reference:
After that from your gitbash run the npm start cmd which will gives you the Output
as below:
NOTE:
Based on the following MS DOC beginning state of the app is located
in the start folder. Make sure you are in that folder for the rest
of this module. Run the following command to open the start folder
in Visual Studio Code
You can refer this for more information: Debugging in Visual studio code.
Let me see if I understand this. I post clearly stated questions about the previous posting, and these are not clear enough for you.

Unable to run android emulator in build agent connected to my local machine in TFS

I am stuck with an issue which I dont seem to find any way to fix it.
I have created a batch file to launch the android emulator
emulator -avd myEmulator -gpu swiftshader
adb wait-for-device
when I open cmd and run the batch file manually in my machine, I am able to launch the emulator.
Now, I have a Batch Task added in TFS which points to the above batch file in the repository.
Whenever I run the task, I see the below information
The emulator seems to be running in the backgroud because when I try and start the same emaulator manually when the build is running, it gives me the error Emulator is already running. How do I fix this. i want the emulator to launch and be visible. I didnot add any script to run in the background because if I run the batch file manually it seems to be working. Please help
Update:
As an interactive process with auto-logon enabled. In some cases, you
might need to run the agent interactively for production use - such as
to run UI tests. When the agent is configured to run in this mode,
the screen saver is also disabled.
Try to run your build agent under Interactive mode. More details please refer our official doc here: Interactive vs. service
According to your description, TFS seems succeed creates and starts emulator in background, and waiting for full android loading on emulator.
To get a workaround, could you try to run the emulator directly on the build agent machine instead of your local machine.
You could setup your own agent and instance on a local machine that runs an emulator. Check if this do the trick.

Remote Debugging for ASP.Net Application

I was facing this issue where i was not able to debug the application which is on server, here i am adding step by step instruction how to achieve remote debugging working.
Step 1. Make Sure Server or Machine from where your application is deployed is having same .net Frame work which you are having on your local system
Step 2. If same Frame work is available then go to your local system path "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE" inside this
One Folder will be present Name "Remote Debugger" copy that entire folder and paste on your Server system.
step 3. Coping the folder is not any location specific just copy anywhere if copying any where is not working then copy it to the "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE"
this path. this folder will have folders
As per your requirement For 64 Bit system use x64 And For 32 Bit system use x86 Folder. others remove
Step 4. Once you done with copy open the specific folder which you kept as per system configuration, Example : I am having 32 bit system will go inside x86 Folder. and open the exe called
"msvsmon.exe" file as administrator.
Step 5. once you open it will show the following window now you are able to connect and debug the remote machine.
Configure Authentication Mode :
For this step refer the below link
https://www.codeproject.com/articles/38132/remote-iis-debugging-debug-your-asp-net-applicatio
Step 6. Open the Visual studio on local machine which will have same version of code which is available on the server machine which you want to debug.
Step 7. Once you open the Visual studio got to the debug -> Attach to Process
Step 8. Once you click on the Attach to process window will get open on the window in qualifier select your server name. once u select that you will see all process of that system below
in that list select "W3svc" service name and click on attach.
Step 9. Put break point on the line of code which you want to debug it will hit when application will run which is hosted on server.

TFS Visual Studio 2012 - Build and send remote automated tests to pool of VMs

I am having difficultly trying to come up with a working automated build and automated testing solution for testing several applications remotely.
I have several different applications which install onto Windows test machine VMs (Win 7) and an automated test solution which is built using a test settings file and test case filter and run automated tests against this application.
I have two groups of VMs, one group to build the automated tests solution which then sends the tests remotely to the second group which has the application installed on.
Currently this is done by a default template build definition (VS 2012) which builds the test solution on a build VM and sends the tests remotely to a test VM (has application needed manually installed prior to starting build), defining a test controller in the test settings file (there is a test settings file per test VM / build definition) the tests are sent to that test controller. Each test VM has a test controller and test agent on the same VM to prevent the tests going to multiple machines, the tests need to be sent to one machine with that specific application installed.
I am wanting to scale this process and allow for complete automation, so I can just kick off a specific application build which will install the required application on a free test VM, build the test solution code on a build VM and send the tests remotely to the test VM which now has the application needed installed on it, run the tests and send the results back.
I am having issues with doing this between the build and test VMs and having the test settings file on the build machine updated with the test controller name of the free test VM.
Is something like this possible to do and if so what would be the best way to go about this?
Any help or feedback would be greatly appreciated.
Setup:-
TFS / Visual Studio 2012 and Windows 7 build / test machines
Reference links:-
How can TFS build process be configured to execute tests on Test Agents through a Test Controller?
Ok, so you need to look at Lab Management for configuring environments. TFS has a built in method of saying that a set of machines go together and that you want to run tests against it. You can then use MTM to push groups of automated tests to environments and record the data.
In addition you should look at Release Management for VS 2013 (works with 2012) for pushing out the bits to your environments.
With those two tools you can maintain release pipelines where not only can you push tests but they pull tests as part of the release process.
http://nakedalm.com/execute-tests-release-management-visual-studio-2013/
You can have a build kick off the process of build->deploy->test and repeat the process easily...

How to build and start a windows 8 metro app from the command line

I can successfully batch build the application with
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe TestApplication.sln /t:Build /p:Configuration=Release;Platform=x64;DeployOnBuild=true
The problem is how to start it. I can see two potential solutions:
Deployed application can be started from the command line or WinApi. The problem is that DeployOnBuild flag seems to be ignored, so the application is built, but not deployed. Is there any way to deploy a metro application, other than using Visual Studio GUI?
Maybe there is a way to run an undeployed application? Using a Visual Studio tool for example.
Thank you.
When creating the Windows 8 application packages, the build process also creates the powershell script file Add-AppDevPackage.ps1. As this is something that can be used for side-loading applications, I'd assume that you could also call this as a part of your process. You should run it manually once first to obtain developer certificate (which will expire after 3 months) and install the app signing certificate, if required. Looking at the script, using a -Force parameter should suppress the certificate installation confirmation dialog.
Under the covers the script relies on Add-AppxPackage cmdlet.
For starting the application, check out this SuperUser question.

Resources