TFS source code binding issue - visual-studio-2010

I have migrated a MVC4 web application version controlled in VSS 2005 to TFS 2015 and that migration is successful.
Then I tried to open the project in VS 2010 (Since VS2015 does not support)
It gives me following error. How do I connect to TFS successfully
Error message:
The solution appears to be under source control, but its binding
information cannot be found. It is possible that the MSSCCPRJ.SCC file
or another item that holds the source control settings for the
solution, has been deleted. Because it is not possible to recover this
missing information automatically, the projects whose bindings are
missing will be treated as not under source control.
Using:
Windows server 2012 + Updates
SQL 2014
TFS 2015 (Version 14.0.24712.0)

Open file - Source Control - Change Source Control... Select all projects and click the Bind... button. That should re-create the binding, if the files are in a valid TFS workspace.
Since you're mixing and matching VS2010 and VS2015, you may first need to set your workspace to "Server" instead of the default for 2015's "Local". VS2010 doesn't support local workspaces. You can change this setting from Visual Studio 2015 only.

Related

What's the use of binding in TFS

I got the latest version of a Visual Studio solution on TFS. But when I try to open the solution in Visual Studio I get the following message:
Source Control
The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?
Asking my colleague, I found out that he's been checking in the changes through Visual Studio without any problem.
Here's my question: Considering the fact that I can still check in my changes via IDE, what is the use of binding a Visual Studio solution or project to TFS (or more generally source control)? Except that "lock"/"red tick" icon appearing beside them in Solution Explorer.
Adding Solutions and Projects to Source Control: When you add a solution to source control, the solution becomes part of a dynamic versioning archive created and maintained by the source control provider. Each time someone checks in a new version of the solution, that version becomes part of the archive and is available to other source control users.
According to the warning message, It seems that you are opening from source control a solution that was incorrectly added to source control (it's missing some bindings strings that should have been in the sln or project files). You should click the button yes and Bind the projects correctly to their server location, then OK the dialog. The server file will be checked out and modified locally. You should checkin the changes after that.

Visual Studio 2019 - Auto Check-out certain files

WE have been having this issue with our Visual Studio 2019, certain files are automatically checked-out on all users when they load the company solution.
I am not sure why but it happens to all every user in the company and on all computers, as soon as you load the single solution that we have, files from Multiple projects are checked-out and they are always those 12 files,
When you compare these files with latest version / Server version you see no difference.
AutoCheckedout
BTW we are using Azure-DevOps Server but we had this issue since TFS 2017 Update 2
When Unbinding and rebinding / reloading Project
According to your description, it sounds like the solution isn't “bound” to the version control provider correctly.
From Visual Studio's main File menu, select File > Source Control > Advanced > Change Source Control
You'll see this dialog:
Make sure the server bindings are correct and that each solution/project is “connected”.
If everything looks like fine, then try to unbind any projects that are bound but not working correctly.
Bind all projects again that are now unbound. Which may do the trick.
Hope this helps.

TFS 2010: Project file gets deleted on Get Latest Version

We have a standard installation of TFS 2010 with a handful of developers. We do have a number of projects with a number of branches but nothing to crazy. Frequently we will go to get the latest version of a solution and TFS will delete the project file (csproj) of one of the projects, a MVC 3 web project. Looking at the Source Control logs we see the following error:
One or more source control bindings for this solution are not valid and are listed below.
Source control bindings can be modified by selecting File, Source Control, Change Source Control from the main menu.
If we go into the pending changes view and undo the deleting of the project file everything works fine. Does anyone know what the error message means and know what it is that we are doing that is causing it?
Environment:
TFS 2010
VS 2012
SQL Server 2008

All project Files get read only attribute after download from TFS 2010

I am using Team Foundation Server with VS 2010. I am facing a problem that when i am mapping a new folder to download the code from TFS, after download all the code, all files/folder in new folder get automatically read only attribute and i have to remove this attribute explicitly after it i am able to build the solution other wise it is giving me "Access denied" error. Is there any TFS setting which is making my project files as read only.
Not with TFS 2010, this is called "Local Workspaces" and is available from TFS 2012 onwards and works like Subversion.
What you are doing, by removing the Read Only flag, is fighting TFS. What you should do is perform a Checkout on the file before editing. If you are using Visual Studio to edit solutions/projects this will happen automatically providing you have your Solution and Project bindings setup. If you are editing files outside of Visual Studio, you can perform a checkout by:
Using Source Control Explorer in Visual Studio.
Using the Team Foundation Server Power Toys to install a Shell Extension into Windows so you can Right click.
Opening the file in Visual Studio and using it as a text editor.
Using the tf checkout command line.
By removing the read only flag, you are allowing yourself to edit the file, but not instructing TFS that you have changed it, so TFS won't know to check it in when the time comes. TFS doesn't scan you workspace for changes like Subversion.

"This project is incompatible with the current version of Visual Studio"

I was getting the below message from Visual Studio 2010.
"This project is incompatible with the current version of Visual Studio"
One situation resulting in this error has already been posted here at Stackoverflow, but that question has been closed. I'm thinking it's a fairly generic problem. Since I have found a "solution", I'll post this question, and my solution as an answer.
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, 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.
VS 2012 has different project type support based on what you install at setup time and which edition you have. Certain options are available, e.g. web development tools, database development tools, etc. So if you're trying to open a web project but the web development tools weren't installed, it complains with this message.
This can happen if you create the project on another machine and try to open it on a new one. I figured it out trying to open an MVC project after I accidentally uninstalled the web tools.
I just got the same error message with a couple projects after installing Visual Studio 2015 Update 3. For me, the solution was to install .NET Core
In my case it was an incompatible Project Type. Editing project file and removing ProjectTypeGuids node resolved the issue of loading the project (I had already re-targeted the framework version as advised here).
Probably the project type is not supported in the (most likely) NEW version of VS, so you will have to adjust (update) the code to work properly (if possible), but at least you can see the content through VS.
I Resolved the issue by deleting the files in the below folder
%localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache
Source: https://forums.xamarin.com/discussion/70388/how-to-fix-incompatible-issue-after-visual-studio-2015-update-3
As for me, I realized there was another web project in the solution that my VS2017 was loading fine, so I copied over the ProjectTypeGuids element of it over to the project that wasn't loading. Its diff was:
- <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
After this, it loads. Don't ask me why.
If you are getting the same error for a project which is actually an extension (.vsix), installing Microsoft Visual Studio 2012 SDK does the trick.
Go to tools -> Extensions and updates -> Online -> Search for project installer -> download
And relaunch Visual studio.
After installing Update 3 for Visual Studio 2015, I suddenly got the "This project is incompatible with the current version of Visual Studio" error message while opening my Cordova project (.jsproj Javascript project file)
To solve this:
Go to Programs & Features
Select the Microsoft Visual Studio 2015 installation and click Change
Click Modify
Install "HTML/Javascript (Apache Cordova) Update 10" of the Cross Platform Mobile Development section
For me, I got this same error in VS 2015 and just installed the VS 2015 update 1, though from another answer, VS is actually up to Update 3, now (after which, they got the error and had to install .NET Core). Had issues when it hit certain packages, like the Windows SDK ones, and had to point the installer back at the paths in my original CD, and for some, even that didn't work and had to skip them and re-download from an internet-connected computer, transfer them over, and run them later manually (computer was not connected to the internet to be able to download updated versions of the packages), but after doing all that and doing a reboot, the error was gone and my project loaded fine.
I had this issue and after hours of uninstalling and reinstalling I found out the issue in my instance.
The reason why I got this was down to the fact that I didn't have the correct extension.
In my case the ASP.net project (my startup) was the incompatible project and this was because I didn't have the following:
Microsoft ASP.NET and Web Tools
Micrsoft ASP.NET Web Frameworks and Tools
It was a simple case of going into extensions and updates under the Tools menu
I had this error and found it was due to the presence an 'Import' XML tag inside the .csproj.user file. Once I removed it, Visual Studio could open the project again.
What most people forget it is that the files of visual studio are just text files, that have some peculiars configurations that will show to the program how to open it. that is, we can change this because it's just a text in some file in there in your project folders.
Well, knowing this, what we have to do is very simple!
The first step is knowing what kind of project it is this project that stay unload. (for example: Class Library)
The Second step is create a new one (Class Library) because you know that your visual studio will create a version supported by himself. Unload this one and click in "Edit csproj".
It's in this file that we can found the configuration that tell to VS how this proj will be loaded and his name is ProjectGuid, this serial number has a variation according the type and version of project.
Now, look at your "ok project", copy the "ProjectGuid" TAG, paste on csproj that unloaded, and pay attention to the little differences and make this files almost equals, except for the tags ItemGroup that represent the references of the project.
Doing that, save all files and close your VS and open again, now your project should load normally.
I hope that this informations help somebody to understand a bit more how the VS works and help solve the problems when necessary.
I checked if i could create a new solution and was unable because SSAS,SSIS and SSRS weren't there as options.
I downloaded SSDT from here and installed and it worked...
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017
In case you came here looking for the issue with ".smproj" file, it is because you are missing SQL Server Analysis Services(SSAS). To over come this, install SQL Server Data Tools(SSDT) in your system, restart your Visual Studio and it will work.
Thanks.
This is my answer, I think it's useful. Please follow below steps:
1.First check your Visual studio version is 2012, 2015 or 2017 etc.
2.Your project is developed in 2015, but your visual studio 2012, then visual studio 2012 should not open the which are developed in visual studio 2015 projects.
3.If developed project visual studio 2012 and you have visual studio 2012, open the project but here need to check one option as per below
a) Target Framework - Open your project ".csproj" file with notepad++ and search with "TargetFrameworkVersion" and observe target framework value.
b) Open any existing project in your visual studio - Select project at 'Solution Explorer' - Right click - Properties - Application -Select Target Framework - Observe highest your framework which you have
c) 3.a and 3.b frameworks both are should same otherwise applications are not open
d)If your target framework less than the project framework should install the latest's
e) above options do not work just Simply have another option modify the "TargetFrameworkVersion" value in '.csproj' file which is have in your visual studio.
Ex: in my visual studio target framework 4.0 but in '.csproj' file have TargetFrameworkVersion - 4.5, You need just change 4.5 to 4.0 and open the project
This issue might be caused when using VS 2015 with Update 3 installed on one PC and without update 3 installed on another. This was the problem in my case.

Resources