How can I change the SVN URL in Visual Studio - 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?

Related

How to force TFS server to take all of my local files?

I have a couple of ASP.NET Core based projects being developed using Visual Studio 2019.
I am having issues where my workspace and TFS server on Azure-DevOps are out of sync. My PC contains the most recent code and I want to push everything I have on the server. I don't really care about the status of the TFS server as it is wrong. I just want to force everything to get pushed to ensure my PC and TFS are syncing again.
How can I force the TFS on Azure-DevOps to take all my files? I don't even mind removing the project altogether from Azure-DevOps and push all files as if this is a new project.
According to your description, sounds like there is something wrong with your source control binding. Or maybe some files outside of Visual Studio do not detect by TFS server. Which cause your workspace and TFS server out of sync.
If you want TFS server detect changes done to files outside of Visual Studio, the simplest way is using local workspace.
Now anything else changes files outside Visual Studio, your workspace detects the changes automatically.
It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under `Excluded Changes
If you are using server workspace, this is kind like when you are offline, you cannot work with your local files because they are read-only until you check them out. So highly recommend you switch to local workspace, you just need to make sure you open the files in VS from a path which the same as your TFS local worksapce. Then it will auto sync changes in Visual Studio and show in pending changes.
More detailed information on the pros and cons of local and server workspaces, please refer our official link.
Now in your situation, we suggest you fist back up all of your local codes/files first. Then delete your old workspace, create a new local workspace.
Get latest from your sever, then copy all your back up to your workspace folder. Then let windows file system auto detect the difference between them, replace files download from server with your back up local version.
Now your local workspace should contain the latest version of your code/file, Visual Studio will auto detect the changes and list them in pending changes, if something added in excluded list, manually promote them.
Finally you could just check in/push all pending changes to TFS server. Now everything back to the track again.
Hope this helps.

how to import project via ankhSVN from visual svn server?

We are two developers and want to share a project.
On one PC I have VisualSVN server installed (as a SVN server), TortoiseSVN (for adding project to repository), and ankhSVN (for Visual Studio, because it's easier than the others). I can create a repository and add a project to it. On the same PC I can get the project from SVN server using file://path. On the other PC I can browse the repository in a browser using https://PC2/sbn/prj/trunk, and also with repository browser in VS2010.
But when I want to import the project (file, open, open subversion project), I don't know how to address the URL file, because the https address does not work there.
Is there any special way to address that?
From repository Explorer select your host , add user and password and login to the server , then find your solution and then click on check out from svn , then you will be able to get the project from svn server .

How do I put an existing Visual Studio solution under source control using VisualSVN Server?

I have an existing Visual Studio 2013 solution, and I want to put it under source control using VisualSVN Server. I installed VisualSVN Server and created a new blank repository. Their Getting Started page doesn't explain how to add a folder structure and files to the repository. I am expecting an import or add files option when right clicking on the repository node in the UI.
How do I add an exiting root folder and all its files and folders of a Visual Studio solution to a repository and make it ready so any SVN client can check out files from it? I am planning to use TortoiseSVN as the client.
You need to install TortoiseSVN and check out a working copy of the repository. Copy from solution into the working copy, select all files, and make a rightclick and select TortoiseSVN -> Add.
Commit the changes and now you have the data added to the repository.

Change TFS source control mapping in Visual Studio 2013

I have multiple solutions that were previously mapped to a hosted TFS. Their local mapping was defined as well and all the source code was up-to-date locally. I have since discontinued my TFS subscription and started using visualstudio.com as my TFS server.
I went into one of the solutions, deleted the *.vssscc files from the solution and the *.vspscc files from each nested project. When I open the solution in VS 2013, the output window gives me a message saying the the original TFS (unsubscribed now) is not available and that the solution is open offline.
As a result, when I choose the "Change source Control" option, it first asks me to log in to the old TFS whose credentials are no longer valid.
Furthermore, it tells me that the local directory I am trying to map to the new TFS is already mapped to the old TFS. How can I remove this mapping without having access to the old TFS?
Not sure if this works if you're offline, but you can remove the mapping by opening the Manage Workspaces area in Source Control Explorer (click on the ... option of the dropdown to the right of Workspace:)
Manage Workspaces -> Select your workspace -> Edit -> Remove or change your mapping.
It's probably easiest to remove the mappings using the commandline
tf workspaces /remove workspacename;owner /collection:http://urlto.old:8080/tfs/ProjectCollection
After removing the old workspace configuration for the current folder and mapping the folder to your new subscription, Visual Studio should prompt you to automatically update the solution bindings to the new server.
This will not delete your workspace from the server (which keeps track of the workspaces), but since you no longer have access to it, it should be enough to let your client forget the folder is mapped.
The answers here work when the old TFS server is available. Mine wasn't but has not been removed from the server list in VS. Removing that entry allowed me to remove the solution from source control entirely along with the mapping and add it to another source control server.

Ankhsvn integration with Visual Studio 2010 - Adding Solution - Working Folders Issue

Newb to Ankhsvn and Ubersvn integration.
I have existing web projects built in Visual Studio 2010 and am attempting to add them into a newly created repositories. The issue I'm having is trying to configure the working local directory. I've got my projects contained in various folders on my machine but it seems Ankhsvn will not let you change the "Local Folder" (which I'm assuming is the working folder) on your machine, it only gives selected options in a dropdown. I know Visual Studio generates it's own solution file in the standard directories (my docs../vis stud../projects/...) but that is not my working directory which it seems Ankhsvn is fixed in.
I don't want to have to move my projects around (and probably don't have enough space on my c: drive anyway). Does someone have any insight on how I can configure the local folders ankhsvn and Ubersvn can work out of?
Using Windows 7 64bit if that has any bearing as well. Our svn repository is hosted externally.
UPDATE
Well I haven't heard any feedback yet on this so I basically went ahead and used the following methodology to get my files into the repository:
1) Used TortoiseSVN to add the files to the svn repository (with TortoiseSVN installed, right click on the folder you want to add, TortoiseSVN -> Import and basically add in the repository URL ad go about adding in folders and files as desired.
2) next step was to then open Visual Studio 2010 and open the given web project folder and then go File -> Subversion -> Open project from subversion. NOTE: make sure when you open that you select the correct folder to import to. It should be one level above the given folder you selected.
3) after the import, all my files appeared as in conflict. I basically just commited the files and the issue went away.
So I now have my project hooked into svn and working through Ankhsvn but has to use TortoiseSVN to get it done...hmmm
To administer the repository in uberSVN you need to make it aware of the repository. The easiest way to do this is to create the repository within the uberSVN admin page, but you've already done that bit, so we need to make uberSVN aware of it.
To do this:
Create a Dump file based on your manually created repository
Login to uberSVN as an System Admin or Repository Admin
Click on Repositories
Click on Add
Enter a Repository Name (which will enter a Location automatically)
Click Next
Click Import From Uploaded Dump File or Import From Dump File Located On The Server
Select the Dump file in question
Click Done
Your repo will now be brought underneath uberSVN, loaded into a newly created Repo sat in the /uberSVN/repositories storage location.
From there you just continue as normal with your preferred subversion client.
Know this QA is old but thought worth updating.
Got a solid, reproducable method for adding projects into remote UberSVN repository from Visual Studio 2010...trial and repeat seems to work consistantly on my side. Here goes
Go to remote UberSVN server, Login
Create Repository
"Your Repository Name"
Added users to repository
Created Visual Studio project (File -> New Project) in similar ubersvn structure…in this case
In windows explorer, created folders D:\\\trunk\
In Visual Studio, create new project, uncheck “Create directory for solution” and I set the “Name” to
"Your Project Name"
In the first solution and subversion create phase, I checked off “Add to Subversion”
Created project and the subversion repository selection popup came up.
typed in the new repository url
http://"your UberSVN Repository URL"/"Your Repository Name"/
Below the Repository URL, I selected the repository “Database” image and then I clicked “Create Folder”
NOTE: When I did again, it seemed that there was already a “trunk”, ”branches” and “tags” folders generated under the repository database -> I clicked on the trunk folder).
If the folders from above notes do not exist, I typed in “trunk” as new folder and then the proper Project url appeared in the “Project will be created in:” section at the bottom of the popup (
http://"your UberSVN Repository URL"/"Your Repository
Name"/trunk/"Your Project Name"/
)
Clicked OK
Started copying files from existing website/project to new project
Once all files are in and no more errors exist, start to do initial commits
Visual Studio 2010 NOTES:
May have to regenerate designer files from older visual studio 2008 projects. Right click on the web form page you want to convert to “Web Application” and it will autogenerate the designer file for the given webform (web page)
Will have to add in references from the bin folder for any dlls needed in project
If bringing over classes from another project (i.e. in App_Code folder), need to right click on each (or select multiple) and go to properties -> Build Action and change from “Content” to “Compile”

Resources