Unable to check in project into VSTS Repository - visual-studio

I'm trying to check in an existing project into a fresh new repository on VSTS.
I've connected to the repository in Team Services. When I right click my solution and select Add Solution to Source Control, I get the following errors. After that nothing happens. Any idea how to fix this?

You need to create an appropriate workspace so that there is a mapping between your TFVC repository and your local file system.

Related

TFS Project Deleted, how to upload code to new project

Somehow on my team's TFS server, one of our projects got deleted. The code is on my local machine though so I'm trying to get it reuploaded, but I'm running into issues getting it back on the server. I've recreated the project and given it the same name and Visual Studio seems to recognize that the new project I've created is connected to the Project I'm trying to upload as a result. The problem is that when I try to check in the version I have to the new project it throws a pile of errors because the files "does not exist at the specified version or you do not have permission to access it". Is there some way to force the upload so that the files are all on the server again?
First remove .* folder from your current working project.
Then go to Visual Studio
Open Team Explorer
Click On Manage Connection
Add your account If not added
Enter your tfs url
Select your TFS folder where you want to checked in your code.
Try to checked in your code.
Even though you have deleted the project on server side, all changes in TFS are non-destructive.
You could check this, just navigate to the Source Control –> Visual Studio Team Foundation Server section.
In that section is a check box that says "Show deleted items in the Source Control Explorer"
If you have recreated the project and given it the same name and want check in local code to TFS. This may cause some trouble.
Suggest you to permanently destroy the project in TFS using Destroy Command (Team Foundation Version Control)
tf destroy [/keephistory] <itemspec1>[;<versionspec>][<itemspec2>...<itemspecN>]
[/stopat:<versionspec>] [/preview] [/startcleanup] [/noprompt] [/silent] [/login:username,[password]] [/collection:TeamProjectCollectionUrl]]
After destroy the old project, then create a new project with the same name, add your local code to this project, finally check in pending changes.

Visual Studio Team Services opens an empty/unupdated solution?

We're trying to work together on our project, using VS Team Services. The problem is when we're opening the project from within its' VSTS website - what we see is the project empty and not updated with any recent changes.
The project's repo is on my PC, so I'm able to open it not from its' website.
'Sync' was being used.
edit: It seems that whenever I commit changes the VSTS saves our project to its' VS-site. why is that necessary?
You should add the source files to source control first. Then you could use Push with Git (or Check-in for TFVC) effectively. In your case, you should use the "Add to Source Control" option on the Solution itself to add all the appropriate files to source control.
Note that VSTS host two different source control technologies: Git and TFVC.
I would advice you to understand which technology you are currently using by reading this detailed article, then you will be able to add the source and work with team on the same repository.

TeamCity unable to fetch Git repository hosted in Visual Studio Team Services

I was configuring TeamCity (running on Windows Server) for a new project of which the Git repository is hosted in Visual Studio Team Services. The configuration is similar to other projects that we host on there. However, this project does not seem to be able to fetch the repository, unlike the others. It is complaining about some missing git-upload-pack service.
The error I get when testing the connection:
Test connection failed in SomeProject :: Develop Build
List remote refs failed: cannot locate repository at https://***.visualstudio.com/DefaultCollection/_git/SomeProject: https://***.visualstudio.com/DefaultCollection/_git/SomeProject/info/refs?service=git-upload-pack not found
What could be the reason that this project encounters the error, but the other do not? Also, how could I fix it? Many thanks in advance.
Make sure you install the latest TeamCity 9.0.3, which fixes some git connection error.
If you rename the project befor. The fix is to edit .git/config in your project and make sure the remote URL for VSTS reflects the updated project name. git-upload-pack not found
Turned out I forgot to give permissions to our BuildUser in Visual Studio Team Services. The BuildUser is linked to TeamCity, so TC was not able to fetch the repository.

Using a BitBucket Repository Locally with Visual Studio

My company has just begun using BitBucket with Mercurial for version control and I am having a heck of a time integrating it locally with Visual Studio 2010. I can easily create a folder on my local system and clone the BitBucket repository using TortoiseHg and it brings down all the files appropriately. However, when I try to create a Visual Studio project in the same folder, it insists on creating it's own sub-folder for the project files, leaving my version controlled source files out of the project. When I try to do it the opposite way, creating my solution in Visual Studio first, TortoiseHg will not let me clone my repository into the same directory, saying that it needs a new folder. All of my google-foo seems to be coming up fruitless.
Anyone have a clean way of setting up a cloned repository from which to work locally in Visual Studio using Mercurial and BitBucket?
You can
Create your Visual Studio project.
Right-click the project folder and choose TortoiseHg -> Create Repostory Here.
Add and commit files in TortoiseHg.
Push the repository into a new empty repository on Bitbucket. To push, you use the synchronize view and add a new path to the repository. Name the path default and it will become the default push and pull path.
The important point is that you can always push into an empty repository. This is how you copy a repository you've worked on locally to Bitbucket: create a new empty repository online and push to it.

How can I change the SVN URL in Visual Studio

In my office, I have a working repository, where I am able to work on my laptop to modify files and commit them to that repository. I am using a local URL for this, which points directly to the PC containing the repository. Additionally, we published this repository for external users as well, so they are able to make changes to the repository without being on our local network. All is working fine there. However, my laptop which normally using the local connection, now needs to be moved to one of those external locations. I would like to be able to change the URL in my solution in Visual Studio, without having to 'create project from SVN'
Navigate to View -> Pending Changes.
You can see the Pending Changes prompt at the bottom.Then Select the drop down on the top right and select other option. Provide the new URL and click on OK button.
Done!
Whay you need is relocate (NOT switch) to tell your working copy that the URL of the repository changed (from your local URL to the external URL).
In the thread Collin linked to is most likely the correct answer:
How to switch subversion repository in Visual Studio using AnkhSVN?
How to switch subversion repository in Visual Studio using AnkhSVN?

Resources