VS 2015 Custom TFS Policy Error - visual-studio

We have some custom policies in TFS and are getting errors on the Pending Changes screen in VS 2015. The policies are working in VS 2013 and earlier.
'Microsoft.TeamFoundation.PowerTools.CheckinPolicies.ChangesetComments, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered
Any ideas?
Thanks!

The custom policies have to be compiled for the version of the .NET framework used by TFS 2015 / VS 2015.

I have also faced the same issue. But, installing TFS power tool solved my problem. What I have done was, Downloaded and installed TFS power tool for the Visual Studio version I'm using and restarted the machine. that's it the issue got resolved.

Had the same problem with VS2013. Installing TFS Power Tools and restarting machine resolved the problem.

Related

Could not load type Microsoft.Build.Framework.IProjectElement in Visual Studio

Until recently everything worked fine, but I installed Visual Studio (15.6.3) Enterprise on top of my Visual Studio Community (15.5.X). This caused problems with existing projects (specifically with .shproj files), so I've slowly uninstalled and taken more and more drastic steps. Most recently I've:
Uninstalled Visual Studio Community and Enterprise
Deleted all files from AppData/Local/Microsoft/VisualStudio and AppData/Roaming/Microsoft/VisualStudio
Restarted the computer
Reinstalled Visual Studio 2017 (just community since that was working fine) with the following options checked:
.NET desktop development
Universal Windows Platform development
Mobile development with .NET
Now if I try to make a Console App (.NET Framework), I get a popup after clicking the OK to create the new project:
Microsoft Visual Studio Could not load type
'Microsoft.Build.Framework.IProjectElement' from assembly
'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
I'm unfortunately dead in the water until this is solved. Any help would be much appreciated as I'm about out of ideas.
The error message was slightly different (Microsoft.Build.Framework.IProjectElement vs Microsoft.Build.Framework.SdkReference) but the solution posted here solved my problem too:
Could not load type 'Microsoft.Build.Framework.SdkReference' on project open in VS 2017 U1 (15.3)

Visual studio 2017 - Not able to restore Nuget packages

I am using Visual Studio Enterprise 2017, I created a ASP.NET Web API project and it was working fine.
Today I got a new clone and when I tried to restore my packages, it keeps showing me this error
I have tried the following
Restarted Visual Studio as administrator
Rebooted PC
Disabled firewall settings
Disabled antivirus
Checked the port too, which is not being used
Nothing seems to work. Has anyone faced a similar issue? Is there any alternative way?
Not sure if this is an issue related to Visual Studio 2017, I managed to resolve this by opening the solution in visual studio 2015.
Again by opening in 2017, this is the solution for now. If anyone comes up with a better solution it will be great.

Registering Custom checkin policy for VS2013

I installed Visual Studio 2013 and having problem with Custom Check in policies. I added new Key and Value to the registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Checkin
Policies\MyPolicyName
Basically I followed everything in this link: http://msdn.microsoft.com/en-us/library/bb668980.aspx., but I still get error:
Internal error in "My policy". Error loading the "MyPolicy" policy
(The policy assembly 'MyPolicy, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' is not registered.). Installation instructions:
To install this policy, read InstallInstructions.txt.
Previously it was built in .NET 4.5 and worked fine with VS 2012. I though maybe building it in .NET 4.5.1 might fix the problem, but it didn't. What should I do to fix it? and where is the InstallInstructions.txt located?
UPDATE:
I am using TFS 2012 and SQL Server 2012. Visual Studio 2013 Premium (not preview).
Thanks for the help!
Finally I figured what was wrong. I had two versions of Visual Studio installed. 2012 and 2013. Year ago I created a custom cheking policy using VS 2012 and I was trying to make it work with VS 2013. I tried rebuilding in VS 2013 and it didn't work. I tried rebuilding it in a machine that only has VS 2013 and figured that it was still referencing to VS 2012 libraries. So I basically removed all references added VS2013 libraries. That solved the issue.
here at msdn forum.

TFS Client Error using Visual Studio 2010

I have been getting this strange error with VS2010 TFS client, whenever i try to do
any operation related to TFS.
Method not found: 'System.String
Microsoft.TeamFoundation.VersionControl.Client.ExtendedItem.get_LockOwnerDisplayName()'
More background : I was working with TFS build services on my machine and
later I uninstalled the TFS build services .. And after that i started getting this problem.
Also I repaired VS 2010 (Pro edition) and also re-installed VS 2010 SP1 .
Reinstalled TFS build services, reinstalled tfs power tools also
But still the problem persists.
Any clue how to repair/fix this?
Any way to fix the TFS client part of VS2010 ?
After installing the following hotfix,the problem was fixed.
FIX: A hotfix for Visual Studio 2010 SP1 is available to add compatibility support for Visual Studio Team Foundation Service Preview
Intresting point from the above site :
Note The following hotfix includes all the Team Foundation Client
hotfixes that were released after Visual Studio 2010 SP1 was released.
Hope this is helpful to others too.
(I guess this must have refreshed my VS2010 TFS client files)
Another solution :
Bind and rebind the project to the TFS server.
It has solved the problem in my case.
Good Luck.
This same issue happened to me after Windows Update installed update KB2813041 to Visual Studio 2010. After I uninstalled this individual update, it started working again.
Here's how to uninstall an individual update. Go to Control Panel > Windows Update > View Update History > Installed Updates (appears in a sentence at the top of the dialog). Then, scroll through the list of updates looking for Visual Studio and then right-click on the update you want to uninstall and click Uninstall.
Hopefully this helps somebody.
Thanks,
Andy

The error "This project is incompatible with the current version of visual studio" displayed

I installed Vs 2010 Express in my PC, and created a poject named myproject with .net 4.0, it works well in Vs 2010 Express.
Now I installed Vs 2012 Express in my PC, and open the project myproject and upgrade it to .net 4.5, it wells well in Vs 2012 Express too.
I delete the project myproject all files, then restore it from my old backup file, when I try to open the project from Vs 2010 Express, I get the following information.
"This project is incompatible with the current version of visual studio", why?
How can I open the project in Vs 2010 Express? I guess the Vs 2012 Express maybe mark the project as .net 4.5 and stored the information in the somewhere of hard drive. Although I restore the project myproject from old backup file, Vs 2010 Express still think it is a project of .net 4.5.
Thanks!
If the message "This project is incompatible with the current version of Visual Studio" is due to an attempt to open a project targeting .Net 4.5 with Visual Studio 2010, then the "solution" or workaround is to edit the .csproj file and change the TargetFrameworkVersion from "v4.5" to "v4.0". That at least allows the project to be loaded, although it may result in compiler errors if the program is dependent on 4.5 features.
I know this is a little old, but just in case the above solutions don't work: don't be an idiot like me and try to open an MVC project using "VS for Desktop" instead of "VS for Web" (or vice-versa), since it will give you the incompatible message.
I use TFS at my job and I tried to open a MVC project via the TFS Solution Explorer. I wasn't paying attention to which Visual Studio version I had open and since both IDE's look alike, I was confused at what was going on - a common mistake, I'm sure =P
If you are getting the same error for a project which is actually an extension (.vsix), please install Microsoft Visual Studio 2012 SDK
Installing KB2781514 - Update for Microsoft Visual Studio 2012 solved the problem for me.
Check the directory that contains the solution file for an UpgradeLog.htm file. It will probably show what's wrong. In my case I tried to open an ASP.NET project, but the Web Developer Tools were not installed.
The Web Developer Tools can be installed afterwards by going to the Control Panel and to modify your existing Visual Studio installation. After adding Web Developer Tools the project opened without issues.
In my case the problem was the Component Model Cache (Visual Studio for C++).
in VS2013 it is located in
%localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache
in VS2015 in
%localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache
Rename this folder and restart visual studio.
I received this error because during the BizTalk install I did not check the Developer Tools and SDK checkbox. I went back and modified my installation and that error went away for me now.
Trying to load a BizTalk Project in VS2012 without BizTalk installed on your developer machine, will result in this error and the projects will load. This should be the first thing you check.
Make sure that all your extensions are same as in previous version. For me, when I upgraded from old PC to New PC, I didn't downloaded correct extensions hence resulting in above issue.
I faced out with this problem, the solution was:
Open VS2017
Go to Tools
Go to Extensions and updates
Search for Reporting Services Project and then "Enable"; close your VS.
Open again your project/solution.
--
MT

Resources