How to deploy TFS aggregator in TFS 2018 - tfs

I'm not sure that TFS-aggregator will work in Tfs2018.Update1.RC1
But as per the below image, it should work(I hope)
I'm trying to do some POC by creating a rule using TFS aggregator
All works fine when I tested my rules using TFSAggregator2.ConsoleApp.exe
Now I want to deploy this rule to my original TFS (which will automatically trigger for every save on the WIT)
I've followed the instruction from here
As per that the Step 5 is,
Copy TFSAggregator2.ServerPlugin.dll, TFSAggregator2.Core.dll and
TFSAggregator2.ServerPlugin.policies to the plugin location on the
Application Tier of your TFS Servers:
The plugin folder is usually at this path for TFS 2017: C:\Program
Files\Microsoft Team Foundation Server 15.0\Application Tier\Web
Services\bin\Plugins; You must copy the exact same files on all TFS
Application Tier servers. TFS detects automatically that a file was
copied in and will load it in.
You can verify if assembly version matches TFS version using this
Powershell code
My Problem
I couldn't able to find the TFSAggregator2.ServerPlugin.dll, TFSAggregator2.Core.dll in my current directory which looks like this
The two dlls were already in the destination folder!
So I just copy and paste my TFSAggregator2.ServerPlugin.policies from C:\Program Files\TFS Aggregator\samples to C:\Program Files\Microsoft Team Foundation Server 2018\Application Tier\Web Services\bin\Plugins
I thought this will work but it's not working
Solutions so far which I tried
Restarted the tfsjobagent net stop tfsjobagent , net start tfsjobagent

Related

Visual Studio Team Services clone command

Im trying to find command for TFS like clone/checkout for GIT. I have regular TFVC version control system, NOT the Git. I have project on TFS and intranet server on which the my application works (it is php app no compilation is needed, only copy is required). I need to deploy changed files from TFS to intranet server. When i was using Git i only need to checkout changed files to server.
Is there any similar option how to do this on Visual Studio Team Services. I don't want to use deploy option in tfs. It is not possible to allow Visual Studio Team Services to access my intranet server (im looking for different way how to copy data on intranet server form TFS). And also i dont want to have full Visual Studio on my intranet server. Is there any option how to deploy changes from TFS to intranet server?
If you are using Visual Studio Team Services, you could try the Xcopy command.
Include xcopy command in script, then add script into tfs git build process.
How to run script in your build process:
https://msdn.microsoft.com/en-us/library/dn376353(v=vs.120).aspx

TeamCity hangs when updating sources from TFS

I have configured TeamCity to work with our TFS repo. I have configured the VCS Root and used the "Test Connection" to ensure that the settings are all correct. When I run a build it gets to the "Updating sources" and just hangs there. Here's the build log.
[13:33:45]Collecting changes in 1 VCS root
[13:33:47]Clearing temporary directory: D:\TeamCity\buildAgent\temp\buildTmp
[13:33:47]Publishing internal artifacts
[13:33:48]Using vcs information from server. Reason: no revision information for build configuration "Build Development trunk" and checkout directory D:\TeamCity\buildAgent\work\db23c120e1319dcb on agent
[13:33:48]Clean build enabled: removing old files from D:\TeamCity\buildAgent\work\db23c120e1319dcb
[13:33:48]Checkout directory: D:\TeamCity\buildAgent\work\db23c120e1319dcb
[13:33:48]Updating sources: server side checkout (1m:21s)
[13:33:48][Updating sources] Will perform clean checkout
[13:33:48][Updating sources] Clean checkout reasons
[13:33:50][Updating sources] Building and caching clean patch for VCS root: Development trunk
The checkout folder is empty. Any ideas?
EDIT
I've written a Windows batch file that gets the code out from TFS rather than using TeamCity to do this. My batch file runs perfectly when run from the Windows command prompt but fails when run from TeamCity. I am using the fully qualified path to TF.EXE because TeamCity doesn't seem able to find TF.EXE (even though the path has been added to the PATH environment variable).
My batch file correctly configures the TFS workspace before trying to GET the source code. But it still fails.
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf.exe" workspaces /collection:http://code-srvr1:8080/tfs/DefaultCollection
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf.exe" workspaces /s:http://code-srvr1:8080/tfs/DefaultCollection
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf.exe" workfold //fails!!
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf.exe" get $/MSM\Development\Trunk /force /recursive //fails!!
The error I am getting is "Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'"
But as can be seen I am already specifying the workspace in the batch file.
Any ideas why these commands work from the Windows command line but fail from TeamCity? How do I get them to run from TeamCity?
The solution in my case was to upgrade my Team Foundation Client from 2012 to 2013. There are known timeout issues with the 2012 version and upgrading to 2013 has resolved these.
I had the same issue (TeamCity builds that fetched code from TFS would get stuck indefinitely at the Updating sources stage, blocking the agent).
The solution for me was to make sure that the TeamCity Build Agent ran under the same service account as the TeamCity Server. The server would be able to access the TFS project and instruct the agent to do a build, but the agent itself got stuck when it was not authorized.
When that account mismatch was fixed, it all started working as it should.
As a side note, when the parameter “teamcity.tfs.mode=java” is set, the TeamCity agent does not get stuck, but instead fails with an instructive error message (detailing the current service account name), if it runs under an unauthorized account.

Transfer TFS 2012 to another machine

Now we plan to move our running Tfs server to another machine in data center.
Running tfs server specifications:
1.Having several tiers: two app tiers and two data tiers
Data center tfs server specifications:
1.Single box topology: the data base and the tfs server in the same virtual machine
We have done the following steps to do backup:
Run tfsbackup.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to backup the tfs from running tfs
Backup all data bases including the report servers (the data bases are selected default by tfsbackup.exe tool)
Backup the encryption key for reporting services (followed steps in here)
After backup, we do the following to restore the tfs:
Log to data center tfs server as tfs service account (the tfs service account should be in local administrator group)
Run the TfsRestore.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to restore data base backup
After restore, open the tfs console to attach the collection from the restored data base
Issue:
When we try to attach the collection, we are blocked at the step to list the available data base: the restored data base can't be listed out.
Could anyone give some suggestion?
Thank you very much.
After some investigation, we found out the way to store the tfs is wrong.
Actually we are doing tfs transfer. So we should do the following steps to do tfs transfer and it works:
Logon tfs server in data center as tfs service account, and the tfs service account should be in local administrator group
Open tfs console and remove tfs feature : remove the current installed tfs instance
Manually delete all tfs related data bases in data base server
Be sure the related tfs service is running including www service
Run the TfsRestore.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to restore data base backup
Run TFS installer and follow the Application-Tier Only wizard to do tfs transfer configuration
At the data base step, click list available data base to list the restored data base
Restart the tfs server
Check the tfs configuration in the tfs console and update some links
10.
Thanks.

Why does "tf history ." claim there is no working folder in my mapped TFS directory?

I am trying to modify my project so that on build it queries for the current TFS changeset for the local directory and uses that to form the build number (using http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file as a reference).
Since we currently are not using team build or any continuous integration for this particular project at this time I plan to use:
tf history . /r /noprompt /stopafter:1 /version:W
However, when I test this command out using the visual studio command prompt in my project's directly (where I work from TFS) it claims:
There is no working folder mapping for xxxxxxxx
The folder is shown as mapped in my workspaces in Visual Studio's Source Control Explorer (shows as the local path), and when I edit my workspace.
Why is the command line utility claiming there is no working folder when it is?
You will see this error message if you are using Visual Studio 2012 (and the corresponding Team Explorer 2012 client) and you are using tf.exe from Team Explorer 2010.
TFS 2010 clients store their local workspace cache in a different location on-disk than TFS 2012 clients. Thus, if you are to create a workspace with a TFS 2012 client, the TFS 2010 client cannot see that workspace data until it has connected to the server and populated its own local client cache.
It sounds like you're okay with using the TFS 2012 version of tf.exe, so I would make sure that your PATH contains an entry to that one first, and this should resolve your problem.
If you really wanted interoperability between the two versions, you would need to make sure to connect to your TFS server from both clients in order to make sure the workspace cache was complete for both. However make sure that you are using only server workspaces in this case, as TFS 2010 cannot connect to a TFS 2012 local workspace.

What am I doing wrong - problems building using TFS 2012

I am trying to get the most basic configuration of TFS 2012 up and running.
So far I installed the TFS server using the simplest option (the 1st option in the installer - the one that comes with a bundled SQL express),
I configured the build service (1 controller, 1 agent, both on the TFS machine).
My project consists of 2 parts: a C#/silverlight part, and a C++ part.
After adding the silverlight prerequisites the C# project builds correctly.
However I can't get the C++ project to build.
I guess I am missing a prerequisite since I am getting the following errors:
C:\Builds\1\proj1\Client\src\Code\Client\proj\main (VC11).vcxproj
(19): The imported project "C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\v110\Microsoft.Cpp.Default.props" was
not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
Indeed, the TFS server does not have a "C:\Program Files (x86)\MSBuild\Microsoft.Cpp" folder (while my dev machine has one).
I installed the windows SDK, but that didn't help.
I saw on some posts that I need to install VS 2012 on the build machine. Is that correct? will VS express do?
I have been banging my head on this for the last 2 days, and any help would be appreciated.
Installing Visual Studio on your build server seems like a strange thing to do, but having been around the TFS block a bit, I have found it to be the simplest way to manage build servers.
You can copy the files manually from your dev machine to your build server, but if an update to visual studio comes out, you will need to figure out what has changed and make sure you update all those files too. These files typically include Targets files and associated dlls.
Also with all the extensions and packages that are available now, it is just easier to load Visual Studio on your build server and install the required packages than try to work out what is needed to replicate the functionality.
This was made very clear to me recently when Microsoft released ASP.Net and Web Tools 2012.2. This altered the publishing pipeline for Web Sites and Web Projects and I needed to use this in my TFS build. It was so much easier to just be able to log onto my build server, load Visual Studio and download the new update.
I would definitely support installing Visual Studio on your build server.

Resources