AnkhSVN - can't add project to subversion - visual-studio-2010

Is anyone here familiar with ankhsvn?
I have a solution with several projects (3 C# and 2 C++), but when right-clicking on a project, I only get the option to add the solution to subversion. The option to add just the project is grayed out. Anyone know how to do this? What can be the problem?

You must first create a Subversion repository from outside
the Visual Studio environment.
You can do this using a Subversion client such as TortoiseSVN, or the command "svnadmin create
<repository_path> at the Subversion command line.
from ankhsvn get start page

Related

Migrating from webstorm to Visual Studio 2015 - importing files from subversion using ankhsvn

I have been using the Webstorm trial version for a month and it has expired, so now I am considering using Visual Studio.
However, I have come across a stumbling block using ankhsvn, which is that I cannot figure out how to "import" files from existing files in subversion and add them to a project. Add to Subversion simply adds a new folder to the repo and I cannot see the existing files in the project explorer.
Is there a newbie friendly tutorial on how to import files from an existing svn repo to a solution in local space?
D'oh! Turns out I just needed to use Tortoise to check out the files, then create a blank solution in the same folder as the check out (this is important or ankhsvn won't play nice), and then add existing website to the project.

How to add existing project to VS2013 from Github

i have one project in Github. i just like to know how could i attach that project with my local VS2013 so i can work and commit and other team member too. i search google lot to know how to attach existing project to VS2013 from Github but no luck. so if anyone knows it then please share the idea. thanks
Just clone the project in your favorite Git client, then open the project file in Visual Studio.
You don't need to do anything special. (although you'll probably want to install a Git extension for VS)
Here you can find a good step by step post about how to configure a Github repository in Visual Studio 2013.

Adding an existing folder to SVN outside of visual studio

I have created a repository online and I want to add an existing folder to it and make it version controlled. I am using TortoiseSVN.
When using Visual Studio I can just click "Add to Subversion" and it automatically adds the versioning to my project. When I click into the physical folder everything has icons next to it implying it's now versioned. I can then just commit it all either in or out of visual studio.
My problem is, I now have a folder that isn't part of a Visual Studio project that I want versioned. But I can't work out how to do it. If I click import I can import all the files but it doesn't add the versioning to the folder. I can then export it else where, but still I don't have the versioning.
What do I have to do to make my existing folder versioned without Visual Studio doing it?
You should read the SVNBook and TortoiseSVN manual. At least they'll help you to understand the concept behind Subversion and version-control in general.
When you svn import some folder to Subversion you can later get the working copy of this folder by doing a svn checkout operation in TortoiseSVN or a command-line client.
Whatever tool you are using in Visual Studio is using a subversion client under the hood - you can normally invoke this tool directly from the command line if wanted.
If you are not comfortable with that, you can download and install the free TortoiseSVN tool that integrates with the windows shell. Once installed, you can right click on the files/folders to add them to your repository outside of Visual Studio.
I have just worked out how to do this, so am answering my own question in case someone else is trying to do this:
Create the repository on the server,
svn import everything into it,
svn checkout what you just imported over the top of your existing folder.
Everything now will have ticks by it ready to commit!

How do I make SVN commit before each time I publish on VS 2010

I'm running Visual Studio 2010, VisualSVN and TortoiseSVN.
Each time I use webdeploy to deploy the website, I'd like it to commit all of my files to SVN. What's the best way to accomplish this?
Visual Studio does a build when you hit the publish button. You can create a build configuration in VS2010 that executes commands after a successful build. You should install the command line SVN client and use that to execute a commit. Call the SVN command line client from the Build Configuration.
A more common approach would be to commit your change to the version control system instead of using WebDeploy. Then have a build server get the source from version control and incorporate the changes into the server. CruiseControl.NET is a good tool for doing that.
You should investigate https://github.com/loresoft/msbuildtasks which once installed and integrated into your project file, offer support for creating custom msbuild actions.
With it installed you can create 'SvnCommit' actions and associate it with a beforebuild or afterbuild target in your project file.
probably this is not the answer you are looking for - but I do not think you can get this out-of-box. I would suggest you to create a visual studio plugin and integrate it with SharpSVN (subversion client API) to achieve what you want.
UPDATE:
as #maddoxej mentioned, post-build action might work as well. However, I find it's easy to miss what configuration is selected - and press F5. And committing to SVN by accident is not generally a good thing.
Another option I thought about could be VS macro. Just record a macro which clicks deploy and then commits to SVN.
The answers that suggest making the check-in a build action is slightly flawed because the publication process will presumably increment a published build number as part of the publication process. This will modify the source code which will then need checking-in.

How to I disconnect VisualSVN from my Solution?

So I just downloaded TortoiseSVN, VisualSVN and VisualSVN Server. I created a new repository and through VS2010, added my solution to said repository. I then realized that I had some naming issues with my repository so I deleted it using the VisualSVN Server Manager thinking that I could go back to VS2010 and somehow drop the solutions connection to SVN, but I cannot figure out any way to do this? I essentially want to start from scratch with this solution/connecting to SVN but I cannot seem to find a way for it to offer me the initial "Add this Solution to SVN" option. I don't know if this is a TortiseSVN issue or VisualSVN but any advice would be greatly appreciated!
Close Visual Studio then remove the subversion info by deleting all .svn folders recursively below the project folder. They are hidden so you will need to enable viewing of hidden files and folders. Open Visual Studio and VisualSVN should offer to add the solution to subversion again.

Resources