Code

this.Log– Source, NuGet Package & Performance

Recently I mentioned this.Log. Given the amount of folks that were interested in this.Log, I decided to pull this source out and make a NuGet package (well, several packages). Source The source is now located at https://github.com/ferventc... Please feel free to send pull requests (with tests of course). When you clone it, if you open visual studio prior to running build.bat, you will notice build errors. Don’t send me a pull request fixing this, I want it to work the way it does now. ......

Symbolic Regular Expression Exploration

This is a pretty sweet little tool. Rex (Regular Expression Exploration) is a tool that allows you to give it a regular expression and it returns matching strings. The example below creates10 strings that start and end with a number and have at least 2 characters: > rex.exe "^\d.*\d$" /k:10 This is something I could use to validate/generate the Regular Expressions I have created with both UppercuT and RoundhousE. Check out the video below: Margus Veanes - Rex - Symbolic Regular Expression Exploration ......

Virtual Alt.NET – UppercuT Automated Builds

Tomorrow on February 24th, 2010, I’m going to be giving a presentation on UppercuT (UC) at Virtual Alt.NET (VAN). If you are interested in learning about an automated build tool that will save you time and get you to a professional build in moments, not days, you can log into the VAN around 8PM CST on Wednesday (tomorrow). You don’t even have to go to a physical place to see the presentation! You can hang out from the comfort of your own home and watch me walk through how easy it is to use UC. Here ......

UppercuT - The Insanely Easy to Use Automated Build Framework

UppercuT is the insanely easy to use Automated Build Framework! Automated Builds as easy as (1) solution name, (2) source control path, (3) company name for most projects!!! Uppercut was recently called NAnt for the masses! UppercuT is for developers who want a powerful build framework without a lot of set up work. UppercuT is for anyone who needs a standard way of building applications across an entire organization. UppercuT is for anyone who wants to concentrate on just writing code. What can UppercuT ......

AutoTest.NET Changes Now in Source

The changes I made recently to AutoTest.NET have made it back into source control.

Get the code at http://code.google.com/p/autotestnet/source/checkout

Super D to the B to the A – AKA Script for reducing the size of a database

The following is a script that I used to help me clean up a database and reduce the size of it from 95MB down to 3MB so we could use it for a development backup. I will note that we also removed some of the data out. I shared this with a friend recently and he used this to go from 70GB to 7GB! UPDATE: Special Note Please don’t run this against something that is live or performance critical. You want to do this where you are the only person connected to the database, like a restored backup of the ......

Refresh Database–Speed up Your Development Cycles

Refresh database is an workflow that allows you to develop with a migrations framework, but deploy with SQL files. It’s more than that, it allows you to rapidly make changes to your environment and sync up with other teammates. When I am talking about environment, I mean your local development environment: your code base and the local database back end you are hitting. Refresh database comes in two flavors, one for NHibernate and one for Entity Framework. I’m going to show you an example of the one ......

HowTo: Use .NET Code on a Network Share From Windows

If you use VMWare/VirtualPC and you want to offload your source code repositories to your host OS and code from it inside the VM, you need to do a few things to fully trust the share. I’ve found that I keep heading out and searching on this every time I need it so I thought I would write it down this time to save myself the trouble next time. CasPol Changes Save the following as caspol.bat: %WINDIR%\Microsoft.NET\Fram... -q -machine -ag 1.2 -url file://e:/* FullTrust %WINDIR%\Microsoft.NET\Fram... ......

DropkicK–Deploy Fluently

DropkicK (DK) has been in development for over two years and has been used for production deployments for over a year. Dru Sellers originally posted about DK back in 2009. While DK isn’t yet as super easy to grok as some of the other ChuckNorrisFramework tools and offers little in the idea of conventions, it is still a stellar framework to use for deployments. DK works well in environments where you know all of the environments you will deploy to ahead of time (although not required due to the ability ......

Published Applications AKA _PublishedApplications

Less maintenance. Less work to package during your automated builds. Too easy. Remember Our Old Friend _PublishedWebsites? You’ve probably seen the _PublishedWebsites folder when building websites in automated builds. If not you can stop paying attention now. Still with me? Great! So you know how it packages up everything nicely with content files going where they should with nearly ZERO cost to your build scripts. All you need to do is override the output directory (OutDir) and you get this feature. ......

From Zero To Deployed Contest–Winner Announced PLUS Extension To Most Creative

Recently we had a contest to see who could beat my time to get from no code to deployed. Thanks to everyone that participated and everyone that thought about participating in the contest. Most Creative From Zero To Deployed Contest Extended! Unfortunately there were not enough entries to award the most creative video for ZtD. So what we are doing is extending the most creative until May 15, 2011 @ 11:59 PM CST. This gives you almost two months to get your videos in! If you entered before, you are ......

Herding Code Talks About Nu

Dru and I were recently featured on Herding Code Podcast. In the podcast we talk about everything from package management in general to Nubular (Nu) to other package management systems (OpenWrap, Bricks, and Horn, although horn was/is slightly different) to the possibility of Microsoft releasing a package management system. It was a good time and I enjoyed doing the podcast, but the herding code guys start recording at an insane 10:30 PM! I have no idea how I made it through the whole thing and was ......

AppHarbor - Azure Done Right AKA Heroku for .NET

Easy and Instant deployments and instant scale for .NET? Awhile back a few of us were looking at Ruby Gems as the answer to package management for .NET. The gems platform supported the concept of DLLs as packages although some changes would have needed to happen to have long term use for the entire community. From that we formed a partnership with some folks at Microsoft to make v2 into something that would meet wider adoption across the community, which people now call NuGet. So now we have the ......

UppercuT v1.2–NuGet Support

For those that have not yet heard, NuGet went v1 recently along with a whole slew of tools from the Microsoft folks. I’ve been lucky to be a part of the NuGet project and see it take shape over the past few months with community input and contributions. Even though v1.0 was released, we are already moving forward with getting ideas and prioritizing features for the next version. To follow the announcement, UppercuT (UC) v1.2 now includes support for NuGet out of the box. Plus, it will handle versioning ......

The Evolution of Package Management for .NET

The thing to realize is that the destination is never the most important part of the journey. It’s the journey itself. When you start a journey, you are never fully sure where it is going to end up. We started the journey down package management for .NET three times with Nu[bular] (we in this context means the nu team, not me in particular, I was only involved in the last reboot) before we decided to try an existing infrastructure with Ruby Gems. I have always said that I would use the best tool ......

The Future of .NET Open Source Software Delivery

Imagine we are awhile into the future. How do you get open source releases down to your project so that you can use them? How do you get the products down to your computer so that you can use them? Is it easier or harder than the way we’ve always done it before? The Past and Present Before we can go there, let’s look at what we do now (the past is really the same for us here). Let’s say I want to use NHibernate. What do I do? There are basically three paths we all follow in this process. 1. Never ......

How To – UppercuT and Gems

In a previous post I mentioned how I was going to show you how UppercuT (UC) has the ability to make gems stupid simple to create and publish. You ask if gems can get any easier and to that I answer, “Why YES, they can!” How about just filling out the information for the gemspec, running a build and having a nice, shiny new gem ready for publishing? Rock The Gems Basically you want to get the latest release of UppercuT. You can download it or grab the source and compile. There are already instructions ......

UppercuT - Automated Builds - Getting Started Part 4 (External Libraries / Tools)

In Part 1 we downloaded or built from source control. In Part 2 we added UppercuT to our project. In Part 3 we set up the UppercuT configuration. This is a small update into where you keep your external references. If you keep them where UppercuT defaults to, you can skip this step. External Libraries/Tools It’s important to note that not everyone keeps their references to external libraries (lib) in the same location in source control. That’s fine, but it requires a little additional work. In the ......

UppercuT - Automated Builds - Getting Started Part 1 (Get UppercuT)

So you've decided to UppercuT your code and you want to get started. You are making a step in the right direction when you choose to use automated builds. As you read through this, you will see how easy it is to get into the world of automated builds. As you read through some of the other documents, you will learn just how powerful UppercuT is. The first thing you need to do is download or pull the source to your computer and build it. Get UppercuT Download 1. Head out to http://code.google.com/p/up... ......

UppercuT - Automated Builds - Custom Tasks

UppercuT provides hook points to custom tasks so that you can customize UppercuT without ever having to touch the files in BuildScripts. This makes it extremely easy to upgrade UppercuT versions when you keep your custom build scripts separated from UppercuT’s build scripts. To add custom tasks, all you need to do is create them in a folder next to BuildScripts called BuildScripts.Custom. These are the points were custom tasks are called (in order): _compile.build calls BuildTasks.Custom\_compile.... ......

UppercuT - Automated Builds - VersionBuilder

UppercuT comes with VersionBuilder. A common problem many of us have is versioning our DLL assemblies and keeping track of what’s in production versus what’s in source control. If you rock with Subversion, UppercuT has this problem solved. So how do you take advantage of VersionBuilder? UppercuT automatically generates an assembly version file for you during build. All you need to do is hook every project up to it. Notice in the same directory the solution is in, after you run build.bat, there is ......

AutoTest.NET - AutoSpec for .NET

Recently I mentioned I mentioned that I wanted AutoSpec in .NET, but it looks like James Avery has already created it awhile back as AutoTest.NET. I gave the project a little automated build love using UppercuT (a super simple to use build framework. Automated builds as easy as 1 (solution name), 2 (source control path), 3 (company name)). Then I noticed the project looked like it wanted to use log4net, but hadn't really sat down and put that in yet. So I added that as well, plus a few more logging ......

AutoSpec

I was on my way home this evening when I was thinking of a test generation framework that could help me write some of the tests I always write to test construction setters, properties and null inputs to methods. Basically the tag line was going to be "AutoSpec - For those of us that are Test Driven but want to automate some of the mundane tests." Once I got home, I started to look if anything like this is out there and came across something different. I came across a Ruby product called AutoSpec. ......

The Tarantino Project - Database Change Management

The Tarantino Project is a very simple to use database change management system that uses an application or NAnt deployment tasks to do so. I've been checking out Tarantino for about a week and I just started using it today and wanted to share my experience with how easy it is to use. To use Tarantino, all you have to do is follow a couple of conventions. You create a folder for a particular database. Then you have two folders under that, Create and Update. You name each sql task you want it to do ......

The Tarantino Project and MSBuild

One feature I wanted to see in Tarantino is the ability to use either NAnt or MSBuild. So I sent in a patch to add MSBuild. If you want to be able to use MSBuild 2.0 with Tarantino, just apply the patch and rebuild. :D I've also included the patch with this post. Tarantino MSBuild Patch Update: I noticed that patches do not include binary files. In the lib\MSBuild folder, these are what need to be added. log4net.dll Microsoft.SqlServer.BatchPa... Microsoft.SqlServer.Connect... Microsoft.SqlServer.Replica... ......

Git - Distributed Version Control - New User Resources

JP recently talked me into it, so I finally took the plunge and decided to try Git using http://github.com. If you are new like me, there are some guides out there to help you get up to speed on Git pretty fast. A few starter notes, and I will release you to the resources available. Git is distributed source control, so each local copy has all of the history. That means you have all of the history of a project on your local machine. When using Git, there is the idea of staging, committing, and pushing. ......

Universal NAnt Script for MbUnit

If you run automated builds using NAnt, you may or may not know about the MbUnit Task you can add to NAnt. MbUnit has pretty good directions for how to do get their task setup. I've been out to their site a couple of times trying to remember the exact details of the mbunit NAnt task. Dru put the thought into my head, why not make the concept of running the tests a more generic and universal item so that you can just drop a couple of files into a project and be done? I thought about this for awhile ......

The DevHuddle

The DevHuddle. This is a term I started using to identify what my team does to plan development work for an iteration. Basically this is where we sync up and get everyone on an even playing field for consistency, map out our plans and design and coordinate who is going to do what. Why a huddle? In football the team gets the orders (prioritized stories) from the coach (project manager) and then the quarterback (team lead) explains the plan and how the players (the developers) are going to carry it ......

Nothin but .NET Developer Boot Camp - Day 3

Today the most important thing is Coffee! When you take this course (not if *grin*) you definitely need to get coffee after lunch. Some things of note today: Group Interaction There is a lot more group interaction with tasks and the tasks are getting to a point where they take quite a bit lot longer to complete. Group dynamics has definitely picked up and come into play a lot more because by the third day you are much more comfortable with everyone. I am seeing personalities coming out as we get ......

How to Programmatically Install A Windows Service (.NET) on a Remote Machine (with or without Dependencies) - Part One

Sometimes there is no good way to do things on remote computers except through something as low level as WMI (Windows Management Instrumentation). Installing a service is a great example of this. Fortunately for us, Jared Boelen has already figured this out. I recommend reading his posts on how to do this. We are not going to get into the actual MS Build Task that he put forth this time, just the code that would allow you to install a service remotely. NOTE: This is based heavily on Jared's code ......

MSBuild.Community.Tasks - WebDirectoryCreate / WebDirectorySettings Patch Accepted

It appears that my patch finally got accepted and rolled into MSBuild Community Tasks. I posted it back in December and just saw the commit email in the last two weeks. It is the first patch I have submitted to Open Source that has been accepted (also the only patch submitted so far). I plan on submitting patches to this and possibly to Nant as I start working heavily in tasks in the near future. One of which will be ServiceCreate based on one I found from a guy, except adding the ability to set ......

The Real Reason to Use IoC/DI (Inversion of Control/Dependency Injection) and a Container Like Windsor

Can you imagine maintenance where you would only have to change a configuration? How about not having to touch existing production code but be able to completely change the behavior of an existing application?! The real reason to use a dependency injection container is Maintenance. When considering that after you write your first line of code, everything from that point on is maintenance, maintenance is a pretty big deal. Containers make changes seamless. Actually, interface-based development makes ......

Interesting Error with .NET Framework 3.5 SP1 Install

Thought you should know. :D Awesome ......

Caveat to Adding the Everyone Account in VisualSVN Server

You may experience issues after allowing the Everyone special account in VisualSVN Server, such as not being able to commit code. VisualSVN Server is a great product to manage Subversion for you! Recently I posted on how to allow anonymous access to your repository and set up the special "Everyone" account, but I recently think I found a bug in it. It may be expected behavior for what the Everyone account represents, but for me, it's quite unexpected. Once I add the Everyone account , it will override ......

Kansas City Day of Dot Net : Inversion Of Control With Windsor Container

Today I gave a presentation on Windsor Container at KC's Day of Dot Net. The presentation went pretty smoothly, other than accidentally unplugging the projector link. :D I introduced fluent interfaces into my presentation code this time around and it seemed to be somewhat well received. I also added Mass Transit's startable facility to the Windsor configuration and showed how easy it is to use Windsor to leverage production level code. Thanks to all that came! I appreciate the interest and the great ......

Gems For .NET – Community Response

There has been a lot of response in the community about this gems idea we’ve been talking about. I even had the opportunity to sit down with Nick Quaranto, the guy behind Rubygems.org, over coffee Sunday and talk about where we think we are going and what it will take to get there. One of the biggest things that everyone wants to see carrying this idea forward is that we migrate off of Rubygems.org and have our own gem server. And we all agree this is a great idea. There are just two things that ......

How To – Gems And .NET – Dependencies (References)

In my last post I didn’t mention dependencies. Dependencies are their own animal. They require a couple more things to be in place. Let’s talk about those things. In the .NET world, the dependency for compiled bits is usually an exact version of a reference. Let me explain. So for example, you have a reference to log4net, and you don’t ILMerge it into your assembly. You now have a dependency that the DLL needs to be there and a particular version (outside of redirecting the bindings). So what I’m ......

How To - Gems And .NET

In my last post I showed gems being used for .NET. Now let’s talk about How. Most of this stuff I’ve learned over the past two days, so if I have a mistake here or you have a better idea, please don’t hesitate to offer a better solution. The GemSpec The Gem::Specification reference is your friend. In order to create a gem, you need to define a gem specification, commonly called a “gemspec”. A gemspec consists of several attributes. Some of these are required; most of them are optional. From here ......

RoundhousE – ADO.NET over SMO

One thing most database change management tools use is SQL Server Managment Objects (SMO). Most do that because ADO.NET doesn’t allow the batch statement separator keyword GO in sql statements. So most people write off the ability to use a database change tool for sql server without actually having the sql server installed on the machine that is running the tool. This is not a reality in some organizations, especially when licenses for SQL server are limited. Split the GO Recently, a few guys have ......

Warmup – Getting Started

What if there was a tool out there that could let you specify a structure for a project (visual studio solution + everything else) and save you up to 3+ hours of work every time you started a new project? Warmup was an idea by Dru Sellers to remove all of the setup work required every time you set up a new project. You know, create the solution, add projects, put in your references, etc. Then how about getting the infrastructure for your service/website/console set up as well with things like IoC, ......

Running Tarantino With MSBuild

To set up Tarantino to run you follow the instructions from my last couple of posts. Once you've done that, you set up a file to run the project. This is how you set up your folder structure. Under db are two folders, Create and Update. In MSBuild, all of the required files to run, plus my MSBuild file (tarantino.proj). Here is how you set up a batch file to call MSBuild to run your database updates. This file is named dbdeploy.bat. @echo on SET DIR=%~d0%~p0% C:\WINDOWS\Microsoft.NET\Fr... ......

Gems - Package Management For .NET

The Ruby community has enjoyed a great user experience with a package management system they use called Gems. A gem is a package (or a library), compressed with some additional metadata, and can be either source files or binaries. Let’s focus on binary gems. We have the same concept in .NET (DLLs/EXEs). You may have references to other DLLs. When you want to update a reference you are using on a project, you may also need to update its dependencies as well. And so on and so forth. A package management ......

Windows Mobile Phone Bug: Text/SMS messages coming in from 2016 – Need a fix?

If you are seeing text messages coming in from the year 2016 and thinking this is a total WTF (mate?!), put down the phone. There is no need to break the phone. It’s fine. Nearly all WM phones are experiencing this right now. I repeat, there is no need to break the phone! There is a fix for this that requires maybe five minutes of your time. DISCLAIMER: You do this on your own terms. I am in no way liable if you follow these instructions and damage or render useless anything at all including but ......

Two Major Milestones for RoundhousE and UppercuT

This last year I had a focus to get more involved in Open Source (OSS). The year before I had been involved a little by submitting a patch here and there, but 2009 was a big year for me in OSS. I now manage 4 open source projects that have solved a need for me and others. Coming up on the end of the year it was important for me to get some final touches into at least two projects to finish out the year. UppercuT UppercuT (UC), for those of you who have never heard of it, is an automated build tool ......

Lessons In Building An Email Parser

The Classic Infinite Email Loop When building an email parser, one must think about validating an email address that sends you a message. Just because that email address is where the message says it is from does not really mean that is a valid email address. Some of you can already see where I’m going with this. I was building something in Bombali that would respond to emails when receiving them. When Bombali received a message from an address, Bombali would send a response. No checking on the address. ......

SidePOP XMLConfigurator

From my previous post on SidePOP, I wanted to make it even easier to configure SidePOP. So instead of the configure_mail_watcher() from the last post, this is what it looks like now: private void configure_mail_watcher() { EmailWatcherConfigurator configurator = new SidePopXmlConfigurator(); foreach (EmailWatcher emailWatcher in configurator.configure()) { emailWatcher.MessagesReceived += runner_messages_received; emailWatcher.start(); } } Pretty. Notice that Runner became EmailWatcher and instead ......

How To Check Email Programmatically - SidePOP

Background Sending email has long been easy to do with the .NET Framework. There really hasn’t been a facility for checking email though. I recently had a need to be able to check email with and send a response with Bombali (a monitoring tool). I went searching for examples or a solution I could use. I found a few articles on this from a few years ago including the .NET POP3 MIME Client. I never found anything that was free and I never found anything that was easy to configure. Those who know me ......

Command Line Parsing on Windows with Mono.Options

When you have command line arguments to parse (whether on Windows or Linux), the place to look is Mono.Options. To date, I have not found anything better to get the job done. It is a single C# file if you do not want to download the entire Mono Library to use it. I was first introduced in Mono 2.2. The equivalent product is NDesk.Options by Jonathan Pryor. His single Options.cs file has been implemented as Mono.Options. To demonstrate how easy command line parsing can be, I’m going to show you is ......

RoundhousE: Version Your Database

Versioning your database is as important as versioning your code. How much time do we waste currently before we are even productive when we have to fix or enhance something in a database? RoundhousE versions your database how you want. The recommended way is to version based on source control, but that may not be your solution. But for a moment let’s pretend it is. Why would versioning your database based on source control be a big help? What happens if you get a prod fix (or work order) to fix a ......

NHibernate Event Listener Registration With Fluent NHibernate

I’m a huge fan of NHibernate. It has excellent documentation and just makes the whole job of getting things into and out of the database much more enjoyable. There is a whole series of posts on NHibernate from one of the committers, Ayende. When Fluent NHibernate (FNH) came out, it was like butter on sliced bread. FNH makes it even easier to use NHibernate. Ayende had a post a while back on how to use Event Listeners. That helped me to get to event listeners set up. Event Listeners namespace somethingimportant.we.hope.... ......

Full Code Archive