TFS Error: Unable to determine the workspace for this solution - visual-studio-2010

I get this error when trying to "Go Online" with a project on a Visual Studio 2010 ALM project.
The project was previously connected to a team project on Team Foundation Server (2010), but I had to reinstall both the SQL Server and the TFS installation and I guess all that information was deleted.
Now, I'm trying to get the project into a new Team Project on TFS, and the TFS gives me this error.
Any ideas?
Thanks.

What I ended of having to do was re-map the workspace within the Visual Studio 2010 IDE.
From the Visual Studio IDE Navigate to FILE->Source Control->Workspaces
You will see a list of workspaces. Create a new workspace that points to your local project directory and the location of the source control folder on TFS.
It will ask if you want to get the latest version from Source Control, select yes or no depending on which version of your code is the most up to date.

Changing the path for a new workspace folder was not an option for me since the source control repository was way too large to download again.
What I did was re-binding the projects within the solution. In order to do this,
go to FILE -> Source Control -> Advanced -> Change Source Control
Visual Studio will warn you that the binding of all projects will be removed, click ok.
After that click on the 'change source control' again and the list of all projects will appear as not connected. Choose the projects which were previously source controlled and click on 'bind' for each one.
Hopefully the bindings will be set automatically.

I had the same problem but I had to delete the 'solution'.suo file-

You have to rebind into the source control. First disassociate current project from the TFS by clicking on File-> Source Control -> Change Source Control.
And after that From File-> Source Control -> click on Add Website/Solution to Source Control.

To resolve this error File->Open-> Website -> From the left panel click on Source Control and Select specific TFS project.
After selecting specific folder, click on "Run as IIS Website" checkbox .

Related

Visual Studio 2013 Pending Changes does not include newly added item

I am currently start using Visual Studio 2017 along with Team Foundation Service that is why this question arise.
When I am working with Visual Studio 2013 and add new item to Solution and then do Pending changes from Team Explorer, It does not included newly added item to solution or project.
I have sample problem with same scenario in VS 2017.
Actually I want to work with TFS and Visual Studio 2017/2015/2013 but not want to bind solution. Only Team Explorer level binding I want to use.
If you create a new item and then check both in VS2013 and VS2015, please make sure you are using the same workspace for VS2013 and VS2017.
In source control explorer, check the workspace is same between VS2013 and VS2017.
In pending changes, also check the work space is same as the one in source control explorer.
If you create new items separately in VS2013 and VS2015, please make sure you add items by the same way and options.
For TFVC, there are many ways to add files to source control:
File option in VS. In VS -> File -> New -> Project, if you select Add to source Control, it will automatically add the new project in source control ( you can find in pending changes).
Source Control Explorer. If you add files or folder in source control explorer, it will automatically add the new items in source control.
Add files in the local map copy. If you add files by this way, you need to manually add files to source control, such as VS -> File -> source control -> add items to folder.

Why does Visual Studio not know that my source is in TFS?

Every now and then when I add a new project to my solution Visual Studio does not register properly that the project is under source control in TFS.
Intially, all seems well. I check in and the project shows up in TFS. My workspace is a Server Workspace.
Next time when I change a source file in this project and try to save it, Visual Studio does not automatically check it out for me, but in stead warns me that the file is read-only.
When I open the Source Control Explorer, my files are there. When I right-click on the project in Solution Explorer and choose "Add to Source Control" I get the warning that the project already is in Source Control. The solution is on-line , therefore this question is different from Visual Studio isn't tracking changes, or checking out files from source control as I edit them.
This happens in VS2013 and VS2015.
How do I tell VS that the project is in TFS?
The solution is to add a few lines to your csproj-file:
Right-click on your project in the Solution Explorwe and choose "Unload Project"
Right-click on your project and choose "Edit xxxx.csproj"
Add the following lines in the first PropertyGroup. I tend to put then after the FileAlignment tag
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
Save the file
Close the file
Right-click on the project and choose "Reload Project"

Visual Studio 2013 VSS binding error

When I click on the "Change Source Control..." menu item, all projects in my Solution are Bound except for the Deployment Project. When I attempt to bind the Deployment project, I get this error message:
The folder you chose is not a valid binding root for the projects you have selected. You attempted to retarget a solution to a source control folder that is not within the solution's root. In the change source control dialog box, specify the root for the solution. Select the folder 5 levels higher in the tree to change the source control bindings correctly.
The fixes mentioned in this answer don't apply to me as I don't have any "..\" in the .vdproj file...
Valid binding root for VSS?
The Deployment project is in a subfolder of the .sln folder.
How can I get around this error message?
You may try below steps and see if it works.
Back up your solution
Unbind the solution and projects in Change Source Control dialog.
Save and restart visual studio.
Try rebinding the projects to VSS.

Visual Studio 2012 Business Intelligence SSIS packages missing

I have Visual Studio 2012 solution with multiple BI projects. One of the SSIS projects do not show all the ssis packages in the Solution Explorer (checked in by another teammember). But the missing files are in the TFS (Source Control Explorer) and are visible in the physical folder.
I tried "Show all files" did not work.
I tried adding the file again but the project does not allow that saying "file with same name exists".
Any idea what is going on here
The authoritative source of what's in a project is going to be the ProjectName.dtproj file.
Inside of that will be entries for the packages that comprise the project. For a non-package deployment model, it's trivial to edit the file by hand and make your stuff show up.
It's way too much effort to do that by hand for a 2012+ project deployment model. Open the Project in Visual Studio (ssdt/bids) and right click on the project. Click Add Existing Item (not add package) and then click the "missing" package. Check your .dtproj file in and all is right with the world.
I had the same issue in 2020, I managed to solve it by building the solution.
On the menu select Build-> Build Solution OR Ctrl+Shift+B

Why is TFS ignoring a project in my solution?

I have multiple projects in our solution that is in our TFS 2010 repository. I've added about 5 new projects to this solution in recent days.
I have found that for one of the projects, that the project file itself will not check-in to TFS. All of the artifacts contained in this project are working fine; they are checked in and I can see them in the Team Explorer. But I cannot see the project file in Team Explorer, nor is their an icon next to the project in Solution Explorer that would indicate its checked in status.
Also, clicking on any of the TFS related option in the context menu in Visual Studio results in those options being applied to the file contained in the project, not the actual project itself.
Can this be remedied or do I have to create an entirely new project and add all of the artifacts from the old project back into it?
Your project doesn't have appropriate Source Control Bindings! With the solution open, you'll need to go to File -> Source Control -> Change Source Control to view the bindings for your projects. The failing one probably will show an "Unknown" or not binded status. You can then use that dialog to correct the binding and check in the project file.
Appended Alternate Solution -
Navigate to the Team Explorer -> Source Control and manually add the files using the "Add Items to Folder" menu item.
You can try following steps
1 Unbind the project in "Change Source Control" dialog
2 Refresh project to update source control status
3 Right click the project and click Add the Project to source Control in solution explorer
I was faced with the same issue but the solution is slightly different than those mentioned so far. My project's contents were checked in but the project itself was not. The project's bindings were valid.
In the Team explorer's Source Code Explorer, the project files were greyed out. After a get-latest, TFS opened the Merge Conflicts screen where I could choose to keep the local copy.
After this, the project was part of TFS.

Resources