VS Code Connect to TFS Server for Ubuntu - visual-studio

I use VS Community as a Developer and have spun up my own TFS Server in the past. I have been using Ubuntu more frequently and decided to try out VS Code. I started up Code and installed the Visual Studio Team Services Extension which is what I thought would be what I needed. I've read/tried online that you first have to open up a Solution which then redirects you to sign in to the web portion of their TFS/Teams which is not where my code resides. I was also not able to find the equivalent of the Team Explorer in Windows and the Plug Icon that asks you for a connection.
So my question is, how do you connect to your TFS Server and get your Projects in VS Code for Ubuntu, if possible?
UPDATE: I have gotten closer trying the following but do not have a complete solution. These steps will at least get you closer to connecting to your server.
Run Java -Version to ensure you have at least Java8 if not, run sudo apt-get install default-jre
Next download https://github.com/Microsoft/team-explorer-everywhere/releases/download/v14.114.0/TEE-CLC-14.114.0.zip
Run the command at your download location /../extract TEE-CLC-14.114.0.zip
Run this command to accept the EULA /../TEE-CLC-14.114.0/tf eula
Run this command to connect to TFS (assuming yours is the same as default) /../TEE-CLC-14.114.0/tf workspaces -collection:http://[SERVER IP HERE]:8080/tfs/defaultcollection
Sign in using AD or your Login
Run this command so you do not have to supply creds export TF_AUTO_SAVE_CREDENTIALS=1
Open VS Code > File > Preferences > Settings
On the right side is the user settings add the following "tfvc.location": "/../TEE-CLC-14.114.0/tf" and Save
Restart Code and that's all I have thus far

Below is a short list of steps to get up-and-running with TFVC support:
Install the Team Services extension for Visual Studio Code.
Team Foundation Server requires your domain credentials.
Ensure you have a TF command line client installed (either TF.exe or
the TEE CLC).
Set the tfvc.location VS Code setting to the full path of your TF
command line client.
Open a folder containing a Local TFVC Workspace and sign in when
prompted.
Set the SCM Provider to TFVC.
So your next step is opening either the root folder or a sub-folder of the TFVC repository. Detailed step you can refer to the documentation below:
https://github.com/Microsoft/vsts-vscode/blob/master/TFVC_README.md#quick-start
Also, you could check the video below which shows you how to set up the TFVC support on Windows and demonstrates much of the functionality available for Team Foundation Version Control. The features shown in this video apply equally well to the TFVC support on macOS and Linux:
https://www.youtube.com/watch?v=6IzJ2UPGmoQ&feature=youtu.be

Related

Microsoft Visual Studio asks for login endlessly

Microsoft Visual Studio Community 2019
Version 16.4.2
Every time, something changed in my local git repository (while solution is open), or i open another solution, or at random point of time Visual Studio asks me for login, i'm entering correct login pass, and VS asks for login again after 20 secods. The process repeats endlessly.
How to avoid this repeats for login, login just once and work for a log time?
tried this, but it doesn't help https://developercommunity.visualstudio.com/t/caught-in-a-login-loop/107160
Login loop can happen if there is a Nuget package from a custom source. To verify whether this is the problem, go to
Tools -> Nuget Package Manager -> Package Manager Settings -> Package Sources
Copy and paste each source into a browser and inspect the result
If it says something like User 'xyz' lacks permission to complete this action. you may need an Azure DevOps team to give you ReadPackages permission.
I solve the problem by using credentials not from my VisualStudio, but from azure devops, where do we keep .sln
I don't know how these things are related, but it works (may be it's related to submodules some how, since few day ago we swtiched authentication for the from ssh to https. Another guess that it's because some of nuget packages are stored in feed and nuget tries to update packages source in a background.
UPDATE
Yes, the problem was related to the fact .sln used nuget packages from feed, to access them you need to authorize
In my case, I needed to log in to the source location from my browser.
I don't know why it works, but it does, the code is hosted in azure-devops.
You can disable git integrations from VSCode see Remove git integrations from VSCode
or you can use ssh key see https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops

Setup a local TFS/TFVC repository in VS2015

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.

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.

VS 2010 ClickOnce - Specify URL for Offline Installation?

I'm using Visual Basic 2010 Express Edition on a Win7 machine. I want to install a program using ClickOnce so that it will be available offline (available in my Start Menu). I have set the Publishing Folder to a location on my hard drive. I set the install mode to "Application is available offline as well (launchable from Start Menu). When I select Publish Now, I get the message "Please specify and install URL."
Why will it not install to the Publishing Folder? How do I correct this?
The publishing file location is where you want to publish the application to.
The installation URL is where you want to install it from.
You might publish it to a folder on your C drive, then put it on a webserver. That's why those two are different.
VS 2019:
Click "Updates" and uncheck "The application should check for updates"
Since is an offline installation, it should not check for updates
It seems that the publish path must be a network path or a web URL and cannot be in the form I show above. I was able to deploy and make the application available offline by using the home network path to the installation folder of my laptop: \\Users\Tim\Documents\Temp\Installations\OCRLibrary\

TFS command line - which server?

I am currently working with 2 different TFS servers. When running the tfs commands in Visual Studio Command Prompt, how is it determined which TFS server to work with. For example, the "tf status" requires a TFS server parameter indicating which server to run the command against. But, for other commands, like delete for example, how does it know which server to perform the operation against?
Thanks in advance.
In general, the command line tools (tf.exe, tfpt.exe) automatically determine the server based upon the workspace that the current directory is mapped to.
If you are running the command in a directory that is not mapped in any workspace, then you will need to explictly specify the server. Some commands require a workspace (e.g. tf edit) and you will not be able to run them without a local folder workspace mapping.
To explicitly specify a server:
For the Visual Studio 2008 tools, you
can use
/server:http://tfsserver:8080/
For the Visual Studio 2010 tools, you
use
/collection:http://tfsserver:8080/tfs/Collection/
/collection also applied to other commands like witadmin.exe
Generally speaking, the TFS command-line commands will work with the workspace that the relevant files are in. So, if you are deleting a file using tf delete, TFS will use the workspace data. It doesn't actually perform the delete on the server until you check in, but when you do, TFS will use the server associated with the workspace.
It works by looking in the current location and then determining if there is a workspace active in that location, if there it uses that one. Otherwise you have to tell it by pointing at the server or local source locations.

Resources