Setup a local TFS/TFVC repository in VS2015 - visual-studio

I want to create a new project in VS2015 and set it up to use TFVC instead of Git.
I changed the source control plugin to Visual Studio Team Foundation Server from Tools->Options->Source Control->Plug-in Selection, and I created a new project with "Add to Source Control" checked, but the project is still created with a Git repo.
I also tried adding a server connection from Team Explorer->Manage Connections->Servers...->Add..., but there was no server at http://localhost:8080/tfs (I assume it's not install by default).
My question is how can I work on a TFS repository that is local to my computer (it's OK to use a server so long as it's on localhost).

You have to install Team Foundation Server on your local computer.
This is a separate download and not a part of Visual Studio.
According to the system requirements, TFS (starting with 2013) can only be installed on a 64-bit OS. You don't need to install SharePoint or any other part of TFS that you won't use (like for example Build Services).
You also need an instance of SQL Server running on your local computer. TFS will create a bunch of databases on this instance where it stores its internal data. If you don't have a license for SQL Server, you can use the Express Editions of TFS and SQL Server both for free. These Express Editions are recommended by Microsoft (see previous links) if you plan to use TFS only on you local computer, but of course you can use a paid edition as well if you need some special feature.
After installing TFS you have to create a Team Project Collection in the TFS Administration Console which can be found in the Start menu. Then add a new connection in the Team Explorer as shown in your screenshot and create a new Workspace (Source Control Explorer --> Workspace --> Add) with a Working Folder that matches the local directory containing your source files.
The URL of the TFS is the one that was set in the Application Tier of the TFS Administration Console. (http://localhost:8080/tfs is the default URL.)
As far as I know it's not possible to use a TFS/TFVC without installing and configuring a full Team Foundation Server reachable by a URL, but of course anything can be limited to be usable only on your local computer.

Related

How can I host Office add-ins on localhost?

I'm new to web-servers. I have Internet Information Services (IIS) 10 Express installed on Windows 10. I'm trying to develop an Office add-in so as to host it in the same computer I use. The problem is how do I host the add-in in a local web server? Since I'm new would appreciate a little of step by step answer.
while you are developing the add-in, you do not need to worry about a local web server. The Visual Studio tools take care of all that for you (it will run in a web server provided by Visual Studio).
If you are using Visual Studio 2015 (the community edition is free and works fine with Office add-ins), you simply create a new 'office add-in' project and it will all be set up for you. It will create a 'web project' for you and it will use that web project when you run the application locally - you do not need to do anything to make that happen.
You may find that you have to install the Office tools for Visual Studio but if you go to File > New > Project > Visual C# > Office/SharePoint you'll get a link to download the tools if you do not already have them.
In terms of hosting it in the public domain, I like to use the Azure Web App service as you can very easily publish directly from Visual Studio or you can setup continuous integration with GitHub, VSO etc. Once you have it hosted in the public domain, you simply change the 'Source Location' in your office add-in manifest file to point at your public URL.
Well I figured it out.
Except it broke my VS Setup now (Resolved)--> See here Installing IIS broke Visual Studio Office Add In Project Localhost
To enable IIS I had to open "Programs and Features" and select "Internet Information Systems".
Then start --> IIS. Browse to default site and added binding for SSL/Port 44367 (Same as VS). I already had a SSL cert from previous configurations, selecting the Dev Cert worked fine.
I copied everything from \ExcelWebAddIn1\ExcelWebAddIn1Web\* to the webroot C:\inetpub\wwwroot and adjusted the following in manifest.
replace:
~remoteAppUrl
with
https://localhost:44367
I then sideloaded the manifest and it worked as expected.
Note that Martin Kearn's answer still applies, this isn't needed if you want to just use VS and it has better debugging, but I wanted to test and learn.
This was all to test/debug deployment, and I was able to do the same by just changing the localhost url to a simple nginx webserver w/ the contents of the above webroot.

Deploying to FTP/Web Deploy In Visual Studio 2015

I cannot figure out a way to publish a web project in Visual Studio 2015 CTP using web deploy or FTP. In the Publish wizard, there are only options for Azure, Import and File System. In Visual Studio 2013, there is a Custom option where you can specify the connection settings and choose between Web Deploy, Web Deploy Package, FTP and Filesystem.
I tried moving over the publish profile from my Visual Studio 2013 project by putting it in the Properties-->PublishProfiles folder, and then it behaved like Visual Studio 2013, but would not publish (failed to connect to remote host) with the same settings that publish fine in 2013.
Any ideas?
It sounds like Web Deploy 3.6 beta supports the new content models in ASP.NET 5 (ASP.NET vNext) and I guess that the VS 2015 Web-Deploy client doesn't support it yet. (28 April 2015)
This blog post gives some command-line options for using a publish profile. I'm in a new environment that isn't set up for web-deploy yet, so I haven't tried it myself. (I did a file-system publish to test against my local IIS.)
I also experienced the same issue. It seems that, at the time of writing, the FTP publish target isn’t available yet: I guess that’s most likely because the Web Development Tools are still in release candidate / preview phase, so the GUI still has some missing features.
Luckily enough the issue can be easily solved with the following workaround.
If you don't see the FTP option, choose File System instead and go ahead. When prompted for a Target Location, insert the FTP Server URL and go ahead.
The remaining steps won’t change, so you can complete the wizard that will be saved into a ProfileName.pubxml file.
Once done, open that file and apply the following changes:
Locate the <WebPublishMethod> element and change its value from FileSystem to FTP.
Locate the <UsePowerShell> element and entirely remove it.
Right after doing that, right-click to the project’s root node, select Publish and re-open your Publish Profile via the Publish Profile Wizard in edit mode: all the FTP options (Server, Site Path, Passive Mode, Username, Password) will now be available.

We have an issue connecting TFS workspaces to versions of Visual Studio 2008, 2010, 2012. We get "The path … is already mapped in workspace " issue

Here is what we are trying to do:
In a TFS collection we set up a TFS project “BuildBusinessWebsite”. For this project we will have .Net solutions, SQL Server Reporting Services (SSRS) reports, and SQL Server Integration Services (SSIS) packages. (I have to do development on all three.) We have chosen to set up a folder structure like this in Source Control Explorer with solutions and code in each directory folder:
BuildBusinessWebsite
Development
Application
SSRS
SSIS
Test
Application
SSRS
SSIS
Production
Application
SSRS
SSIS
Now, we are currently developing the SSRS reports and the SSIS packages using Visual Studio 2008 and the application is being developed in Visual Studio 2010. When you connect the second Visual Studio 2010 environment to the same working directory (Local Path: Not mapped) you get the error “The path … is already mapped in workspace …” issue because it is already mapped to the Visual Studio 2008 directory. I need both environments mapped to the same directory as I do not want to keep multiple directories on my machine up to date with “Get Latest”. I am also currently testing the migration to Visual Studio 2012 where it is also asking me to map another location for TFS. My current work around is to create another layer of folder mappings as C:\TFS2008, C:\TFS2010, and C:\TFS2012 with the folder structure above in each. Is there a way to consolidate all these for one location for all the code?
Second issue related to the above is with branching and merging: If there is some way to fix the above then this one is moot, however, when pulling down the folders above from source control and you are utilizing branching and merging, the branching and merging connections between prod, test, and dev do not seem to pull from TFS. They seem to be local to my workspace and machine. Considering the example above where I branch my application from Production to test and test to Development in Visual Studio 2010, when I use Visual Studio 2012, map the Source Control Explorer to another location on my hard drive, and “Get Latest”… After it comes down I lose my branching and merging having to set them back up. Is there a better way to set this up?
Thank you all ahead of time for reading this and thoughts you might have would be greatly appreciated.
TFS Workspaces are uniquely identified by:
Workspace Name
Workspace Owner (AD Account name)
Computer Name (The Computer which it is on)
Team Project Collection it is in
The workspace mapping should have nothing to do with the "environment" you are working in. You should either use the TF Admin command to create your workspaces or go to File->Source Control->Advanced->Workspaces... in Visual Studio. Also, create only 1 workspace and do it at the root folder.

How to check out from tfs on a new machine

my machine died. I need to download the source to a new machine. I cannot access the old workspace on the new machine. There is no source on this new machine. I need to grab it from TFS 2010 basic.
What do I do??
First, you will not be able to access the old workspace on your new machine even when you do get a connection. You will be able to download any changes that you had checked in but not changes that you had made and not checked in.
You will need to connect to your TFS server from Visual Studio on your new machine. From the Team menu item select "Connect to Team Foundation Server..." and then connect to your TFS server. At that point you should be able to get latest like you had on your old box.

Can TFS2010 be set up locally in order to use Test Manager but still tie into work items, bugs, & source code residing in a remote TFS2008 instance?

We currently use TFS2008 for our source control, bug tracking, and tasks. The TFS2008 server is located in a remote data center. Locally, we have Visual Studio 2010 installed on the developer's machines. Is there a way to install TFS2010 so that we can run Test Manager but still tie into the work items and source code on the remote 2008 instance/database?
Yes, and No.
First the No - You cant connect work items from two instances of TFS. You cant even connect between two team collections on the same sharepoint server. If you do not realy need this or you can upgrade your TFS 2008 to 2010 then stop reading.
Advanced only
The Yes - If you install a local TFS 2010 instance you can setup a sync between the work items and source control of the TFS 2008 box. Note that this will be hard as the TFS 2008 probably uses the MSF Agile 4.2 template and you would have the MSF Agive 5.0 template on your local TFS 2010. You will need to set up mappings between the Work Item types and a zero mapping for the Work item types that do not exist on the 2008 box (Test Case being one)
To do this you use the TFS Integration Platform which comes with a TFStoTFS Migration tool out of the box, but you will need to setup the mappings. If you had two identical TFS boxes this is not required, but you need to be able to sync both Work Items and Source Control to keep the Attachments and Links in place.
You then check in and associate with work items to your local TFS 2010 which will then sync that change to the remote TFS 2008 box.
Only use this if there are no checkins to the remote box! You will have to resolve conflicts on the server you use to sync if you do just as if you were checking in.

Resources