Internal error in Changeset Comments Policy after updating VS2015 to Update 1 - tfs

Everything was fine about an hour ago, when i tried to checkin something, the policy friendly reminded me to "provide a comment for the check-in". Then I installed VS2015 Update 1, like some of my colleagues did, and after that, i receive the following error message when trying to check something in:
Internal error in Changeset Comments Policy. Error loading the Changeset Comments Policy policy (The policy assembly 'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered.). Installation instructions: To install this policy, follow the instructions in CheckForComments.cs.
My colleagues, of course, don't. As far as i know since VS2012 there is no need to install any version of the Power Tools anymore, so why does this happen? Additionally I also have VS2013 installed, where i do NOT get that error message, that version is working perfectly. Anyone having any idea where i need to look?

Okay, i got it. Somehow the installation messed something up. On my machine the folder
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation
was pretty empty, where my colleagues had a junction there, leading to this folder
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\XXXXXXX
where XXXXXX obviously varies from machine to machine. To find the correct one, go to the extensions folder (one up) and look for the one that contains "Microsoft.TeamFoundation.Build.Controls.dll" and some other Teamfoundation dlls, then open an elevated command prompt and create the missing junction like so:
mklink /j "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\XXXXXX"
(watch out, you need to replace the XXXXX with the folder name on your machine)
- NOTE: Please dont forget to RESTART Visual Studio after doing this change in order to start cheking in seamlessly.

The suggested answer didn't work for me on VS 2015. I already had the junction, yet I was seeing the error.
https://devblogs.microsoft.com/buckh/internal-error-loading-the-changeset-comments-checkin-policy/ pointed me to this:
Cause
With VS 2005 through 2010, to get the Changeset Comments policy,
you had to download and install the Team Foundation Power Tools.
and I had to download and install Microsoft Visual Studio Team Foundation Server 2015 Power Tools.
It's available within VS here:
Visual Studio 2015 > Tools > Extensions and Updates:
VS needs to be restarted after this.

Related

TFS2015 witadmin exportwitd Error

I am using on-premise TFS 2015(15.117.27024.0). I created a new root project and wanted to export the Work Item definitions so I can add a few fields that are not in the default layout, as described here
I can export the project config and categories without any issue.
The command I am running(replaced URL with example.com):
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\witadmin" exportwitd /collection:"https://tfs.example.com/tfs" /p:"Library" /n:"Feature" /f:"Library_Feature.xml"
Result:
API resource location 8637ac8b-5eb6-4f90-b3f7-4f2ff576a459 is not registered on https://tfs.example.com/tfs.
I did this several years ago for another project but never had this problem.
Thanks for any help!
I tested on my side, cannot reproduce your issue, everything works as expected.
Whatever you can try below items to narrow down the issue:
Please check if you have specified the correct URL, make sure no any
spelling errors.
Try running the export command on another machine which installed VS.
Try to export the WIT definition file with Process Editor (Power
Tools)
Visual Studio 2015 : Microsoft Visual Studio Team Foundation Server
2015 Power Tools
Visual Studio 2017 : TFS Process Template Editor
You're missing collection name in API request:
Error:
/collection:http://MyServer:8080/
Success:
/collection:http://MyServer:8080/tfs/TeamProjectCollectionName

Checkin Policy not working after upgrading to VS 2015

We are running VS2013, along with VSTS for source control. We have a checkin policy that enforces a checkin Comment and for the user to assign a Work Item(s) to the checkin. This has been working fine as expected for a while.
Recently, I got one of the developers to test VS2015 Update 1. He is now reporting to me that the checkin policy doesn't seem to work properly; even though he correctly adds a Comment and assigns a Work Item for the checkin, the system doesn't seem to recognise them and it gives a 'policy failure' warning like this:
Is this a known bug with VS2015? Or some sort of compatibility issue upgrading from 2013 to 2105?
Install 2015 Power Tools on the client PC. Your Power Tools version has to match your Visual Studio Client.
In the past years, we also had to update our check in policies, from 2013 to 2015.
Here is somethings you may check.
Recompile your CheckInPolicy project updating Visual Studio Assemblies references:
Microsoft.TeamFoundation.Client;
Microsoft.TeamFoundation.VersionControl.Client;
Register your Policies:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\TeamFoundation\SourceControl\Checkin Policies]
"YourCheckInPolicies"="PathToYourCheckInPolicies.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\TeamFoundation\SourceControl\Checkin Policies]
"YourCheckInPolicies"="PathToYourCheckInPolicies.dll"
Hope it helps.
Regards,
Wilsade
The company I'm working at changed our PCs and we had the same problem when we needed to install VS.NET 2015 for some old projects.
I simply copied the below directory's content (from an old PC where policies worked) and placed it in the same directory, in the new PC.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
If the directory Team Explorer doesn't exists, create it manually and put the content into it.
OBS: When I did it, I already had VS.NET 2015 Power Tools installed.
So, try to solve it with these two steps:
Install Power Tools to VS.NET 2015 as mentioned in the other answers.
Copy necessary DLLs files to Team Explorer directory. I made a copy of them here.
This was my registry after installed Powetools, and because of that I tried to paste files manually... I got lucky. It worked.

TF30279: Plug-in with ID "Microsoft.ProjectCreationWizard.Build" of type "Project Creation Plugins" could not be loaded

When attempting to create a new TFS Team Project from VS2012 I received the following error after pressing finish.
TF30279: Plug-in with ID "Microsoft.ProjectCreationWizard.Build" of type "Project Creation Plugins" could not be loaded
TFS and VS were both installed on a Windows 7 laptop for evaluation. When setting up TFS I configured the build server without error.
In attempting to get round the problem I uninstalled all 2012 components VS, TFS and Sql Server, then reinstalled them. I tried both TFS express and VS2012 for web express and full TFS trial and VS2012 premium trial (to rule out that it wasn't an issue with the express versions)
Each time the error would persist across re-installs.
Although I could not find why the problem has occurred I did eventually manage to fix the issue after reading up on process templates and understanding where the plugin models were sourced from.
1) I opened VS2012 command prompt and ran as admin
2) changed dir to %programfiles%\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
3) ran gacutil /i for each dll in the folder that looked like it was anything to do with build.

TFS Build is failing Because of Missing Programs

I am trying to build a project using TFS2010 Build.TFS resides on its own server, and i am trying to build to a directory on the same machine. The Server does not have VS2010 installed on it.
When the build runs it fails and gives me this error:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1558): Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task.
Then I get a whole bunch of errors saying the namespaces of the project I am building cannot be found. I am not sure if that is all linked to the above mentioned error however.
Thank You!
It is recommended to have Visual Studio 2010 installed on your build machine but it is not a requirement. Since the error message indicates that it didn't find AxImp.exe, can you verify if this file exists on the build machine? The location is C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin (if you're on a 64-bit Windows).
If the file doesn't exist, installing .NET Framework SDK will probably help to resolve that specific error.
Regarding installing Visual Studio on the build machine, Visual Studio is licensed per user, not per machine, so as long as the build machine owner is licensed, you should not need extra license for Visual Studio. But you probably should look at the licensing papers for your edition of Visual Studio 2010 to make sure.
Here's a table in the white paper on licensing:
You need to have the same software running on the build server as you would if building locally. This means you need Visual Studio 2010, and possibly even the same edition of Visual Studio 2010, depending on what you're trying to build.
IMPORTANT REMINDER: Visual Studio is licensed PER USER. This means that as long as you as a user have a license, you can use that SAME LICENSE on your build Machine.
The only "problem" would be if you actually had "No licenses" - meaning you do not own a copy of Visual Studio at all, but have a legal copy of TFS.

How to get tf.exe (TFS command line client)?

What's the minimum amount of software I need to install to get the 'tf.exe' program?
You need to install Team Explorer, it's best to install the version of Team Explorer that matches the version of TFS you are using e.g. if you're using TFS 2010 then install Team Explorer 2010.
2012 version http://www.microsoft.com/en-gb/download/details.aspx?id=30656
2013 version http://www.microsoft.com/en-us/download/details.aspx?id=40776
2019 version https://visualstudio.microsoft.com/downloads/#visual-studio-team-explorer-2019
You also might be interested in the TFS power tools. They add some extra command line features (using tfpt.exe) and also add some extra IDE features.
I'm in a virtual machine, and am trying to keep my VHD as small as possible, so I find Team Explorer is a really heavyweight solution (300+ MB install). As an alternative, I've had some luck copying a minimal set of EXEs/DLLs from a Team Explorer installation to a clean machine (.NET 4.0 is still required, of course).
I've only tried a handful of operations so far, but this set of files (about 8.5 MB) has been enough to get basic source-control functionality via tf.exe:
TF.exe
TF.exe.config
Microsoft.TeamFoundation.dll
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Common.Library.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
Microsoft.TeamFoundation.VersionControl.Controls.dll
(It should go without saying that this is a completely unsupported solution, and it doesn't free you from the normal TFS licensing requirements.)
Depending on the operations you perform, you may find that additional DLLs are required. Fortunately, tf.exe will produce a nice error message telling you exactly which ones are missing.
For Visual Studio 2017 & 2019, it can be found here :
-Replace {YEAR} by the appropriate year ("2017", "2019").
-Replace {EDITION} by the appropriate edition name ("Enterprise", "Professional", or "Community")
C:\Program Files (x86)\Microsoft Visual Studio\{YEAR}\{EDITION}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe
For Visual Studio 2022, it can be found here :
C:\Program Files\Microsoft Visual Studio\2022\{EDITION}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
There is a Java TFS client in the Team Explorer Everywhere installation (together with an Eclipse plugin). Look at http://www.microsoft.com/en-us/download/details.aspx?id=30661
For reference: these are the required DLLs for Visual Studio 2017 (as did #ijprest for the VS 2010)
TF.exe
TF.exe.config
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Core.WebApi.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
Microsoft.TeamFoundation.VersionControl.Controls.dll
Microsoft.VisualStudio.Services.Client.Interactive.dll
Microsoft.VisualStudio.Services.Common.dll
Microsoft.VisualStudio.Services.WebApi.dll
They will be in my base VM image. I'm going to use it to pull the latest deployment scripts from VC to a temporary local workspace folder when installing a new server.
tf workspace /new ...
tf workfold /map ...
tf get "%WorkSpaceLocalFolder%" /recursive
tf workfold /unmap
tf workspace /delete
<run deployment scripts from "%WorkSpaceLocalFolder%" >
rmdir "%WorkSpaceLocalFolder%"
(Sorry to post this as an answer, but I don't have enough reputation to comment, which I believe it should have been)
The tf.exe command line is included in the VSTS agent package in folder externals\vstsom.
You can also try TFS CLI for Node.js which is a cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services.
Visual Studio 2017 Team Explorer
According to https://blogs.msdn.microsoft.com/bharry/2017/04/05/team-explorer-for-tfs-2017/ you can now download it separately from Visual Studio via this link:
https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=TeamExplorer&rel=15
Following on from the earlier answers above but based on a VS 2019 install ;
I needed to run "tf git permission" commands, and copied the following files from:
C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Core.WebApi.dll
Microsoft.TeamFoundation.Diff.dll
Microsoft.TeamFoundation.Git.Client.dll
Microsoft.TeamFoundation.Git.Contracts.dll
Microsoft.TeamFoundation.Git.Controls.dll
Microsoft.TeamFoundation.Git.CoreServices.dll
Microsoft.TeamFoundation.Git.dll
Microsoft.TeamFoundation.Git.Graph.dll
Microsoft.TeamFoundation.Git.HostingProvider.AzureDevOps.dll
Microsoft.TeamFoundation.Git.HostingProvider.GitHub.dll
Microsoft.TeamFoundation.Git.HostingProvider.GitHub.imagemanifest
Microsoft.TeamFoundation.Git.Provider.dll
Microsoft.TeamFoundation.SourceControl.WebApi.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
Microsoft.TeamFoundation.VersionControl.Common.Integration.dll
Microsoft.TeamFoundation.VersionControl.Controls.dll
Microsoft.VisualStudio.Services.Client.Interactive.dll
Microsoft.VisualStudio.Services.Common.dll
Microsoft.VisualStudio.Services.WebApi.dll
TF.exe
TF.exe.config

Resources