|
-
Feb 22nd, 2016, 09:25 AM
#1
Thread Starter
Addicted Member
Is there a way to auto archive code and builds each time I compile a new one?
So I make changes to the code all the time, but it would be nice if each time I compiled it, that it would keep a copy of the last .exe, and each time I saved the project, that it would save it as a new revision, so that I could step back in time as many revisions as I wanted if I discovered something was off.
Is there a way to do this other than manually?
Last edited by ks101; Feb 22nd, 2016 at 10:55 AM.
-
Feb 22nd, 2016, 10:11 AM
#2
Re: Is there a way to auto archive code and builds each time I compile a new one?
Sort of. It's not always automatic, but you can make it so.
Professional developers use some kind of source control system. It is software designed to keep a version history of text files, and usually designed to facilitate software development. It sounds expensive and complicated, but two of the best ones on the market (git and Mercurial) are completely free, and have tutorials like [url=http://hginit.com[/url] to get you up and running after maybe half an hour's investment. If you really want, you can pay a lot of money for TFS or Perforce or other solutions, but a lot of important projects are using these two free ones.
Source control isn't automatic. You can lean on something like an online backup service or Dropbox to get that kind of "version control", but in reality learning to use source control is more valuable than those tools will ever be. With git, you can say something like, "Please go back to before I tried to implement multiple logins per user." With Dropbox, that becomes, "I need to one-by-one find the version of every file in the project close to about 10:30 AM last Wednesday, I think."
It's not a good idea to toss your build artifacts in source control. Most source control systems are not meant to track binary files, and don't do as good a job with it. Plus, there's many other artifacts of a build you might want to track, such as errors for failed builds and unit test results. That's the job of what's called "Continuous Integration".
It's a fancy term for a server that runs your builds for you. There's some free ones, but I'm not sure if there are free ones for .NET. That's how the Microsoft stack works, you don't get a free lunch. TFS exists and is stupid expensive, you basically have to buy a whole new server to run it. Don't fool yourself into thinking it's an option. Most people use Cruise Control or TeamCity for .NET projects. So what's this tool do?
When it's configured properly, it listens to your source control for notifications that you've submitted new changes. Then, it automatically tries to build those changes and run the automated test suite. If it succeeds, you get an archived copy of the build artifacts for as long as you want. If it fails, you get an archived copy of the build log so you can figure out why and keep track of neat things like, 'How often do I submit code that doesn't even work?'
These tools are most valuable on teams, but I don't like working on anything important without source control anymore. Continuous Integration I can do without.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
-
Feb 22nd, 2016, 10:29 AM
#3
Re: Is there a way to auto archive code and builds each time I compile a new one?
There's a free "Express" version of TFS. It's limited to up to 5 users. I've never actually tried it but as far as I'm aware it's got the full feature set - much like community editions of Visual Studio.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Feb 22nd, 2016, 10:37 AM
#4
Re: Is there a way to auto archive code and builds each time I compile a new one?
We use TeamCity for our CI ... it's pretty cool. It's web-based, so it's easy to access from just about anywhere. Our SOP is to have one CI build, a QA build, a deployment build and a release build. the CI build runs everuytime something is checked in. QA Build runs twice a day, the deployment and release builds run on-demand. Not only will it build the solution, but since we also have our projects linked with MSBuild, it will copy the assemblies out to the application folder on the server and even load our database artifacts for us.
-tg
-
Feb 22nd, 2016, 10:54 AM
#5
Thread Starter
Addicted Member
Re: Is there a way to auto archive code and builds each time I compile a new one?
Sounds like I would be best off writing my own then, simply because I work in a restricted environment where I am limited as to what third party tools (free or otherwise) I can use.
-
Feb 22nd, 2016, 04:11 PM
#6
Re: Is there a way to auto archive code and builds each time I compile a new one?
Errrr, no. It would be a huge job. You could probably muddle something up that kinda sorta worked but you wouldn't even come close to being able to deliver something you'd really want to use.
My suggestion, have a word with your IT department. If you've got any development at all going on in your company then they've almost certainly got a source control solution already in use. If they haven't then point them to this thread where we'll out shout from the roof tops that you're insane to be doing development without source control in place and there are plenty of trusted solutions out there.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|