Monday, September 13, 2010
Hey It's Monday!
Friday, April 2, 2010
TiddlyWiki + Dropbox = Nice Personal Knowledge Manager
Monday, March 1, 2010
Slides from Intro to WIF at CAPAREA.net
Sunday, November 8, 2009
TDD Kata Presentation at CMAPP Yesterday
Friday, January 9, 2009
Setting up an ASP.NET MVC Project using TortoiseSVN and Unfuddle – 2. Creating the VS Solution
So Far
In the last post, I walked through the steps to create the folder structure and checking it into my Unfuddle repository. Now we will pick up from there and create our Solution file, MVC/Test projects, verify it builds, and check that into the Unfuddle repository as well.
A few prerequisites
- Visual Studio 2008 – SP1
- ASP.NET MVC Beta
- XUnit – with the Visual Studio plugin installed (you could do this with MS Test as well)
Creating the Solution File
When creating a new solution I lean toward setting it up first using a Blank Solution so that I have a little more control over the process. You can just let it create it automatically when you create the MVC Project but you don’t get as much control over the folder structure within your project and may need to go back and manually move things anyway. I just do it as I go.
Open Visual Studio and click on File –> New –> Project
Once it opens select Visual Studio Solutions under Project Types.
Then select Blank Solution, enter the solution name, enter the path in your local repository coresponding to trunk\src and click OK.
Now this what gets created:
You will notice that the sln file was created in a new mymvcsolution folder which I really don’t want. I will just close Visual Studio, cut the files and paste them into the src folder and then delete the unwanted folder. ALl the mappings within the file are relative so once the files is moved all is good.
Create the MVC/Test Projects
Now click on the sln file to reopen Visual Studio.
Click on FIle –> New –> Project
Under Project types select Visual C# –> Web and the ASP.NET MVC Web Application.
Enter mymvcapplication for the name, verify that it is using the trunk\src folder as the Location and for Solution it should use Add to Solution.
You should now get the following prompt:
I have selected xUnit but you could also go with MSTest at this point .
Now if you try to build at this point you will get 5 identical fails:
“The name 'GlobalApplication' does not exist in the current context C:\projects\mymvcproject\trunk\src\mymvcapplication.Tests\Routes\RouteFacts.cs”
When you navigate to the code you will find the following:
1: GlobalApplication.RegisterRoutes(routes);
The problem is that the GlobalApplication is named MvcApplication in Global.asax.cs. If you update this in each of the tests to:
1: MvcApplication.RegisterRoutes(routes);
A Little Tuning
Click Add Reference:
Click on the Browse tab an d navigate to the trunk\thirdparty, select xunit.dll and click OK.
If you build the solution now you will find it builds fine.
If you want to see success hit F5 and click ok on the warning to enable debugging in your web.config. You will see this:
Now I will close Visual Studio and Check in.
Checking In
I will now navigate to the trunk folder and right click on the mymvcproject(root) folder and right click on the trunk folder and click on SVNCommit:
I will then click the select all box but then deselect the contents of the bin folder, add a message like “Initial Project Checkin” and click OK. The following dialog will show the files being added and uploaded and the success message (hoepfully):
Now when I open Unfuddle and check the repository I see the files I checked in so we are done!
Ok well done is a strong word really we are ready to actually get started but now we have a place to work and if we check in religiously we have some backup for code changes and such.
Later I will visit how to set up a continuous integration server with CruiseControl.NET so that you can get validation that your checkins don’t break the build.
Please let me know any comments you may have.
Thursday, January 8, 2009
Setting up an ASP.MVC Project Using TortoiseSVN and Unfuddle – 1.Local Repository Structure
1. Create a Repository
The first step is to create a repository in your Subversion server. In my case since I am using Unfuddle I will create it using the web page.
2. Setup the local Folder Structure
In Windows Explorer create a folder to house your project, in my case I will create it a c:\projects\mymvcproject
Within that folder we will create the following folders:
- trunk – will contain the main project files.
- tags – will contain versions of the project as they are released
- branches – will contain any temporary versions like patches
Now tags and branches we will leave alone for now and focus on setting up the trunk folder. Within it we will create the following:
- src – will contain the actual VS solution files
- thirdparty – will hold any external resource libraries that will be used by the solution
- docs – will contain project documentation
Your folder structure should look like this:
3. Import the Folder Structure into the Repository
Now open up in the c:\projects folder (or whichever folder you created the structure in) and right click on the mymvcproject folder and select TortoiseSVN –> Import…
In the Import form enter in the URL of your repository and click OK.
After entering your username and password, you will see the files imported. At this point the folders have not been added to the repository yet. We must now checkin the files to complete the process.
4. Checkin
Now right click on the mymvcproject folder and click on SVNCheckout.
Enter the URL of the repository as before and the path to your mymvcproject folder and click OK
The files will be checked and and you should see this:
Now if you go into Unfuddle and look in your MyMVCProject you will see that the folders have been added as expected:
Continuing
In the next post I will cover the creation of the Visual Studio solution and ASP.NET MVC Project.
Wednesday, January 7, 2009
Setting up an ASP.MVC Project Using TortoiseSVN and Unfuddle - Introduction
Introduction
I am in the process of beginning a new personal project using ASP.NET MVC. The actual project is something I really don’t feel like boring anyone with as it is just something I have been kicking around for a while. The important part of mentioning it, is that, as I am working my way through this project, I will pick key decision points and try to blog about the decision I reach.
The drivers for doing this are to force me to think it through a little more thoroughly, since who wants to blog something only to have someone point out something obvious, and to help me fine tune my skills at communicating the approach.
Will I get everything right? I doubt it, but it will serve as a conversation starter, at the least and hopefully in the end provide some guidance to others finding their way as well.
Getting Started
As I want to try to get the project off the ground to a relatively organized start. I am planning on using Unfuddle as my source control provider and TortoiseSVN as the tool to send updates to Unfuddle. The driver for this is giving me some ability to rollback changes that don’t work. I also get an easy way to keep versions of my code straight on my commuting laptop, my home desktop machine and possibly with other developers if the project seems to have some possibility of going somewhere.
Later I plan to implement continuous integration using Cruise Control.NET to allow me to automate builds to a demo environment to kick the tires as I move forward.
The steps I am going to walk through in this series of posts are the ones to create the initial project structure, tune them a little easier to manage and get them checked in to my new repository.
The actual process is this:
-
Creating the Local Project folder structure and import it into a New Unfuddle Repository
-
Create the Visual Studio Solution, MVC and supporting projects and tune them a little
-
Import the new solution to Unfuddle
As I go through these feel free to post comments and feedback.
Enjoy!