Visual Studio 2017 - Open Folder - TFVC Integration - visual-studio

I am working on an Angular 2+ project in Visual Studio 2017 but without a Visual Studio solution or csproj. We're just using the Angular CLI to generate the project serving the app using "ng serve". We are opening the folder in VS by going to File->Open->Folder, which is working well. But we are using TFVC (Team Foundation Version Control - 2015 on premise) as our source contorl and it seems as if when you open a Folder in Visual Studio 2017 it expects you to be using GIT. When I go to the Team Explorer window I only get GIT options.
I've tried:
Creating a folder apart form Angular
Checking the folder into TFS first before opening in Visual Studio
Reconnecting to the TFS server
NOTE: once the Folder is closed I have access to TFS again. I feel like I'm missing something obvious.

Check comments in this article:
https://blogs.msdn.microsoft.com/visualstudio/2016/04/12/open-any-folder-with-visual-studio-15-preview/

Related

Visual Studio 2015 checks out the solution at build time

After upgrading from Visual Studio 2013 web site projects to Visual Studio 2015 web site projects (NOT web application projects), every time the project builds it checks out the solution file and a diff doesn't show any changes to the solution file.
We are also running ReSharper Ultimate 10.0.1. The Visual Studio edition is the enterprise, if that makes any difference.
I had the same issue. Deleting the hidden folder ".vs" in the same directory as the solution file fixed the issue.

Visual Studio Team Services workspace error

I created a Visual Studio 2013 MVC project in Visual Studio 2013 Ultimate using Visual Studio Team Services through visualstudio.com. I have since reinstalled Windows and Visual Studio 2013 and have reopened the solution and receive error:
The solution you have loaded is bound to the source control server at https://{myaccount}.visualstudio.com/defaultcollection, but no workspace on that server could be located. If you do have a workspace on this server, and you want this solution to be opened under source control,
connect to that server using Team Explorer and then re-open the solution.
I am having difficulty locating how to setup and manage workspaces on my local machine and Team Services.
If you open visual studio and connect to your team project you should then be able to open the solution explorer. Once open you should see your project grated or as It is not maped locally.
Right click on your desired mapping folder level and map it to your local disk.
Note: You will need to map it to another location and pull across any uncommitted changes.

SharePoint 2010 WebPart .g.cs files not being generated by Visual Studio 2010

I've inherited a SharePoint 2010 project that was originally created in another environment using a different version of Visual Studio (2012). My issue is that the .g.cs files for some WebParts are not being [re-]generated when I make changes to the .ascx files. I know that for regular .aspx pages, you can right-click and choose "Convert to Web Application" to force generation of the designer files. Is there something similar for WebParts?
I've already tried deleting the bin\ and obj\ directories in the project, cleaning and rebuilding (both the solution and the project), as well as trying to re-create the WebPart from scratch.
Wrote about workaround here: http://sadomovalex.blogspot.com/2013/08/fix-bug-in-visual-studio-2012-with.html. You need to specify url of correct Sharepoint site on local dev environment in "Site URL" property of your project.
It seems that it's an issue from going between Visual Studio 2010 and 2012. On the 2012 box the .g.cs files are regenerated and updated fine but the 2010 box refuses to do so.
Correction: SharePointWebPartCodeGenerator wasn't being found. After re-installing the Visual Studio 2010 SharePoint Power Tools, the .g.cs files were being updated.
I searched forever for a fix and installing the 2010 SharePoint Power Tools solution fixed the issue! The solution I was working on must have been a 2012 Sandbox solution.

Add existing folder to Team Foundation Server 2010 that already exists for other Team Foundation Server 2012

I am workign with a central Team Foundation Server (2010) and I connect to it from my workstation. On my workstation I use both Visual Studio 2010 and 2012. I have installed both have the Team Explorer 2010 and 2012 and the latest patches and hotfixes.
I need to use both Visual Studio 2010 and 2012 because I am developing both .NET 4.5 code and SQL Server Reporting Server reports for SQL Server 2012.
I can configure both instances of Visual Studio to connect to TFS, I mapped my workspace in Visual Studio 2012 and I can interact with Source Control. I tried configuring Visual Studio 2010 to use the same working folder, I can connect to TFS, I can see the source control folder, but when I try to map it to the same local folder I get the following error message:
Map
The working folder "C:\TFS\Example" is already in use by the workspace JohnDoesPC; Doe, John on computer JohnDoesPC
I tried configuring the workspace mapping through the dropdown in the Source Control Explorer:
Team Explorer>project>Source Control>Map Window>(Set Local Folder)
And I tried it through the Source control menu under the File menu:
Go File>SourceControl>Manage Workspaces>(Highlight my showing workspace)>Edit>Try to add existing folder.
What am I missing? Do I need to map my solution folder to two different local folders? That would be very confusing and inconvenient!
The simplest way to put this is that I want two versions of TFS to point to the same local location. Is that possible? Or should I be creating a new project up just for my SSRS reports?
EDIT: See pic for more detail:
Make sure that in both Visual Studio 2010 and Visual Studio 2012 the same work space name is selected. If you cannot see the workspace of 2012 in Visual Studio 2010, check the advanced workspace settings of the workspace in 2012. Ensure that the workspace type is set to server.
When both Visual Studio versions are using the same workspace name, they should be able to see and use each others file mappings as well.
This is what the settings in 2012 should look like:
And that workspace should be visible in 2010 as well:
Make sure you select the same workspace name in both versions of Visual Studio:

TFS Workspaces across VS 2010 and 2012?

I am currently developing on Visual Studio 2012 RC using TFS Preview for source control. I would like to create an SSIS Integration project, which requires me to use Visual Studio 2010. However, when I connect to TFS from VS 2010, it automatically creates a new workspace and does not list the VS 2012 workspace.
If I issue the tf workspaces command from the VS 2010 command prompt, I see only the VS 2010 workspace, and if I issue the command from the VS 2012 command prompt, I see only the VS 2012 workspace (both indicate the same colleciton is being used).
Is there some way I can get VS 2010 to see the VS 2012 workspace? I would prefer not to have to have two copies of source code just to be able to use VS 2010 for the SSIS project.
TFS 2012 introduces a new concept called local workspaces, which differ subtly from the behavior of workspaces in previous versions of TFS (the old default behavior is now called a server workspace.) Local workspaces do not require read-only files and instead allow files to be edited without checking out from the server, and they are intended to be more suitable for small to medium sized workspaces. For this reason, local workspaces are the default in TFS 2012.
Local workspaces, however, are not compatible with TFS 2010 and TFS 2010 clients will not be able to use a new local workspace.
You can convert the workspace that you created with your VS 2012 client to a server workspace. In the Edit Workspace dialog, select Advanced, and you can change the type from a Local to a Server workspace.
At that point, you should be able to connect with VS 2010 and choose that TFS workspace.
(Note that it's not sufficient to use tf workspaces as that will return a cached copy of your workspace list - you will need to connect to the server either with Visual Studio 2010 or with a tf.exe command that talks to the server.)
In addition to the Location="Server" property mentioned in other answers/comments, the File Time property must be "Current", as shown below.
Workspaces created in Visual Studio 2012/2013 with either Location="Local" or File Time="Checkin" are not visible/usable in Visual Studio 2010.

Resources