SVN in .NET for a small project - c#

I manage a small project for a client I want to be able to start using SVN to give a better service from multiple computers, I would like a SAAS solution as the project is to small to ask for a dedicated server in my client's company.
What is the best SVN hosting service/VS2010 plugin you recommend
Thank you
PS. Other ideas for a solution of my problem are welcome I am new to this way of working (SVN)

AnkhSVN is a good, free and popular plugin. I use it all the time with VS2010, and I'm very happy with it. I also use TortoiseSVN outside of Visual Studio.
VisualSVN is also very popular.
Subversion hosting can be found from many hosting providers, either seperately or as past of a web hosting package. Check out these similar questions:
Looking for Hosted Subversion and Visual Studio plug in combo
Hosted subversion recommendations or suggestions
https://stackoverflow.com/questions/297153/can-you-recommend-a-svn-closed-source-project-hosting-site

I use the Agent SVN plug-in with the Subversion file protocol repository and I works well for me.

I have been using VisualSVN and been very happy with it, or at least as happy as any Subversion user can expect to be. It builds on top of the TortoiseSVN explorer plugin, and does support more advanced stuff like dragging files around inside Visual Studio.
That said, I'd strongly advise you to consider Git or Mercurial instead of Subversion. They don't as easily mess up your local workspace, allow you to commit partial work without interfering with everybody else, and easier sharing through repository cloning and greatly improved merging of changes. If this sounds interesting I'd recommend bitbucket or GitHub as good online source control providers.
Tool support for Visual Studio is almost as good as for Subversion and have a lot more momentum so I'd expect them to catch up pretty soon.

I would recommend Codesion from CollabNet as hosting service, and AnkhSVN (open source) as Visual Studio plugin. Although I prefer to use TortoiseSVN as svn client, even if it not integrated to Visual Studio.

I personally use http://www.projectlocker.com/ for SVN hosting. Its free for small projects, easy to set up, and has always worked well for me. I believe it also allows 3 users and 3 active projects, as opposed to 1 of each like a lot of other free hosts.
I've used http://ankhsvn.open.collab.net/ in the past because in integrates with VS2010, but lately I've switched to explorer integration with http://tortoisesvn.tigris.org/
No reason why really, just personal preference.

I would recommend Assembla. It's free private hosting for small teams. And ankhsvn as VS plug-in.

The TortoiseSVN works well for me.

Related

What installer options do I have for bundling a windows service along with a WPF application?

I've already looked at C#: Making an Installer that installs both a WPF application (ClickOnce) and a Windows Service but that never answered my question. I have a similar set up: a WPF application and a Windows Service. I'd like one installer that installs the Windows Service first, then installs the WPF application. Also, it has to be able to open firewall exceptions as well.
Anybody have any experience with any products that can do this? I've got the feeling that InstallShield Premier can do this but I'd prefer not having to spend $500 or so for a license.
Thanks!
Have you looked at WIX? It's an open source tool for building MSI setups. It's pretty well supported. I haven't used it to do what you are asking, but a quick search did reveal a firewall settings extension for WIX: http://www.joyofsetup.com/2008/05/17/new-wix-feature-firewall-extension/
Have you looked at Nullsoft Scriptable Install System(NSIS)?
A little while ago, I decided to take a little utility I wrote and make redistributable1. I looked at a whole bunch of standard installer options (i.e. VS IDE vs. different flavors of InstallShield) and one thing I didn't like is that they could all do trivial things, but if you needed something just a tad more complicated, the best option was non-free InstallShield or you are out of luck.
Then I came across NSIS. From my initial impression, it looks to be a full blown installer builder. It supports most features, even complicated ones and it is open source. Even for things that the product itself doesn't support, there's a strong community of other developers that post their own scripts and add-ons.
It is probably not as easy to use as InstallShield (I remember IS had visual and very friendly IDE). This one is more scripted, so you need to understand their language. But it's not difficult, I was able to ramp up and create and install package within one day.
1-If you wish to see what NSIS script looks like, you can follow GitHub link in my profile. The project is called "Droppy"

Documentation and Build system for Mono/C#

I'm starting out on a new project and a team member has decided to use C# as the implementation language. I don't have a lot of experience in C#, but a brief reading shows that it's very capable of being a complete cross-platform vm. Beyond the language, I've been having trouble selecting tools and workflows for managing the code as the project grows. It should be fairly small (<10K lines) but I would like to have the ability to generate documentation as the project grows, manage any external dependencies that we decide to use, and automate builds and testing. I am wondering what tools are commonly used or considered best practices for this language.
I am mainly concerned with how would a build system potentially work on *nix as well as windows? Are there C# specific tools or is Make more common? In addition, I'd like to use a dvcs, but it doesn't look like Visual Studio and MonoDevelop support the same ones. What's the common vcs of choice for C#? For testing sort of Unit testing is available for C#/Mono? Finally, I know that there are good doc generators, but with the question of the build system, I would really like to have that just be a single step in the build similar to how testing is a step. Normally I'd automate with Hudson, but I am wondering if there is something more specific to the platform.
Overall, I'd love to see a solution that provides a decent workflow on both windows and *nix without a heavy admin burden. I am pretty sure this is the holy grail of project management, so anything that puts me on that path is awesome.
In a project I work on, we use Visual Studio 2010, MonoDevelop/XBuild, Git, and monodoc. Project files created by Visual Studio 2010 can easily be read by MonoDevelop and XBuild. Also, Git is an excellent VCS for distributed development (I especially like its branching). Monodoc, with some tweaking of command line parameters, can generate documentation from XML comments in code.
You can use any dvcs you'd like with it. MonoDevelop (at least in the trunk, not sure if it has been released yet) as Git support built in. There are some plugins for Visual Studio that give you Git too.
Either way though, you don't need your source control to be integrated within the IDE, infact I prefer it not to be and use Git from TortoiseGit if I'm in windows, or from the command line on OS X (although I'm looking at Gitti for the OS X side).
For build, I would suggest TeamCity, since it supports up to three remote agents allowing you to build on Windows/Linux/Mac with the free version.
For build I'd use NAnt, although xbuild under mono works with solution files so that might be easier rather than maintaining two build scripts. I like NAnt for CI simply because I find it easier to break apart into build, test, cover, package, deploy etc.
I've found that the combination of MonoDevelop, Git, TeamCity and NAnt gives you a few nice cross-platform development setup.
I suggest you try to use one IDE mainly. Most Mono IDEs support Visual Studio formats I guess. At least SharpDeveblop does.
http://mono-tools.com seems the correct way to develop for .NET and Mono only in Windows (not free). I think this is the best option if I ever take developing for mono seriously ina commercial environment, but not 1005 sure.
http://sharpdevelop.com looks promising too, but still fells like the poor man option.
http://monodevelop.com/ is the way to go for developing for Mono in Linux.
For DVCS you can always use Tortoise stuff and be IDE independent. git works great in Linux and TortoiseGit on Windows is very nice. However, it terms of fame, SVN (not DVCS of course) is still dominant, especially it's client can connect to TFS via bridge. Mercurial and Git are starting to take place in C# community though.
CruiseControl.Net is a pretty good build / continuous integration system. It can integrate a load of applications into the build process; we use NAnt for builds, NUnit unit tests and FXCop for code analysis.
Cake (C# Make) is an open source build automation system with a C# based domain specific language that can do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages. It has tons of other built-in functionality and can easily be extended with custom code. It's available for Windows, Linux and OS X and can be used with several continuous integration systems such as AppVeyor, TeamCity, TFS, VSTS or Jenkins.

How to make a setup installer? For asp.net mvc 2.0, cmd line applications and webservices

I am wondering how can I make a setup project for each of these projects
Asp.net mvc 2.0
C# cmd line
Application C# web-service
I am using VS 2010 ultimate and I know that I can use the the free edition of install shield for at least the cmd line application. I am not sure about the other 2. I also know about the setup project that you can use. I just need a lot more than the basics so I am not sure how to make either one do these things.
So here is some criteria that each of my setups should be able to do.
Asp.net mvc 2.0 criteria
free (I really don't want to pay for an installer - you can list them just so I am aware of them).
Terms of service
Ability to force a user to setup certain settings. Like connection string, smtp settings. So they should be able to type it in through the setup wizard and the web.config should be updated based on this.
When it installs the stuff it should all be .dlls for all the C# code.
C# cmd line criteria
All criteria as above
I am not sure if this has to be done in the code but I have a html file that contains a template for a message. The path to this file is in the web.config so I a person needs to set this path each time they install it. I tried to do this in code but I could not figure out how to make it find the right path in development and the right path in production. It seems like If you run in VS the path is different.
Web-service
Pretty much everything I covered in the first 2 ones.
Thanks
If I were you, I would choose WiX as a platform for your installers for all these applications. Some reasoning behind this:
it is XML-based, that is, friendly to source control, diffing and merging
it has rich set of tools for most of scenarios you might need (harvesting lots of files, creating upgrades and patches, creating multi-lingual installs, etc.)
it is free and open source
it is production-ready (at least, version 3.0 - later versions are still in beta)
it is used by Microsoft to create installations for such products like MS Office
it has rich community at wix-users#lists.sourceforge.net and StackOverflow
it integrates into the VS like a charm
it is friendly to build engines like NAnt and MSBuild
VS setup project is not my choice because:
it is very limited in set of features-
it encourages bad practices like Installer classes
finally, it was retired by Microsoft
I'm not familiar with InstallShield Limited edition, though.
Hope this overview will help you finding the best option for your case.

MSI installer for .Net free or low cost!

Hi
I'm looking to deploy my first .Net 4.0 app.
I know VS comes with an installer project and a free version of InstallShield, however the free version of install shield doesn't do what I need, or so I think, and the MS installer is end of life so don't want to learn it!
What is everyone using? I have in the past used NSIS but it doesn't build MSI's and it was a problem to some people who wanted it as an MSI.
Here is what I need to do during installation, in addition to the normal stuff:
manipulate an XML file on the target machine.
Call a COM object
Any recommendations (i don't have 150+ to spend on an installer)?
WiX is free (as in speech and as in beer), but you're going to hate the learning curve.
You can definitely modify XML files, though.
I have had great success with this tool. It has a free version that has many capabilities out of the box. I think it will do the job for you.
http://www.advancedinstaller.com/
Here is the feature matrix, to tell you what you don't get with the free version:
Feature Matrix
You may or may not have found this already, but it is possible to execute Custom Actions in the InstallShield Limited Edition version bundled with VS2010, using a deployed EXE, VBScript or JavaScript.
The number of points at which you can execute the custom action are greatly reduced in the free version, but should enable you to write the appropriate code to modify the XML file and call the COM object as you require.
Custom actions item can be found in Solution Explorer tree for the InstallShield project, under (5) Define Setup Requirements and Actions.
InstallShield 2010LE can consume merge modules which means you can combine it with WiX to inject things into it that it wasn't intended to do. Also it compliments WiX nicely in that it has the bootstrapper that WiX does not.
If your installer is really simple I'd be willing to set it up for you intially for the cost of a nice lunch.

Source control for Visual Studio that doesn't require a server?

Can anyone recommend a source control solution for Visual Studio? I am going to be the only person using it, I just need something to back up my data every so often or before I undertake a big change in the software. I tried AnkhSVN, but this requires an SVN server. Is there anything that can be used locally that takes the pain out of copying solution folders manually?
With Subversion you can create local, file-system-based repositories for single-user access.
Probably the easiest way to use subversion (on windows) is to install TortoiseSVN. To create a repository, you simply create an empty folder in the location where you want the repository to be, right click that folder and select "TortoiseSVN -> Create repository here".
It is even possible (but not recommended) to create such a repository on a network share.
You can then access local repositories using a file-URL e.g: file:///D:/Projects/MyRepository
If you later find out that you need a server (e.g. to give other users access to the repository), you can easily install svnserve on a server and move the local repository to that server.
Just for completeness: as others have noted, there are several good clients for subversion (personally I'm using mainly TortoiseSVN and AnkhSVN):
the subversion command line binaries
TortoiseSVN (free, integrated into windows explorer)
VSFileExplorer (free, gives you an explorer view inside Visual Studio and a allows you to access TortoiseSVN from there)
AnkhSVN (free, integrated into Visual Studio)
VisualSVN (commercial, integrated into Visual Studio)
VisualSVN Server (free, a SVN server with a nice GUI)
Funny nobody mentioned Git just yet. Granted, it does have a learning curve, but I've been using it successfully within Visual Studio for the past year. Both commandline and with a GUI (GitExtensions).
Download Git for Windows from here.
Since it is a DVCS, it doesn't need a server. You can work against your local repositories publishing them to the world when needed (check out Github).
You can use AnkhSVN (or any other SVN client) without a server. Just create a repository on your local disk and then point your working copy to it using a URL like file:///C:/Repositories/repo.
AnkhSVN has improved a lot, but I prefer VisualSVN myself. I think its interface is a little easier to work with (especially if you're used to TortoiseSVN, which it is based on) and it will handle things like automatically setting your build folders as ignored. It is commercial, but it is inexpensive.
You can use Mercurial. It's free, fast and easy to use.
I use it for my personal projects.
VisualSVN can operate without SVN server/
SVN is the way to go. I would look at using the VisualSVN plugin rather than anksvn as it is much more modern and worth every penny.
In a similar situation I'd go download and install Git Extensions. That's all.
That gives you a world-class revision control system (the same one used for the Linux kernel), integrated into Visual Studio and Windows Explorer. No server is required. However, it is fairly easy to set one up later if you want one.
I'm pretty sure that you can create a local repository with Tortoise SVN and use it with ankhSVN without a server.
I use Bazaar with Visual Studio. It does not have Visual Studio integration but it is easy enough to issue commands from the command prompt in a separate console.
You can use Dropbox with SVN, which is free. Sign up for one here. If you didn't like that first article, here's another one. You can pretty much google SVN Dropbox and you'll get all the information you need if these two posts are missing anything.
The advantage of using a Dropbox over local SVN is that you'll be able to get to your dropbox from anywhere, as opposed to only being able to SVN while at home.
They are a lot of cheep or free (for small teams) hosted source code control system. So if you wish to advoid running your own server rathern then not use a server at all, you should look at them.

Categories