Right now I am not impressed with Visual Studio 2008 Express Editions. I am not a fan of the number of different versions to choose from nor the need to use more than one edition. At first, I thought for web development I could just choose the Web Developer Edition.
For .NET development I am a big fan of C# so I avoid Visual Basic whenever possible. I am also a big fan of testing my code so when I am finished I have a product that does what I expect. I just started to get into Test Driven Development (TDD) but I think I'll save that topic for another post.
Back to the multiple edition discussion. Since I am doing Web Development in C# I thought I could just grab the one aptly named version and be on my way. Well, mostly. If you don't need to test any of your classes it works just fine. However, if you want to run your classes through a unit test using the standard package NUnit then you are in trouble.
NUnit tests classes by using the assembly a class or set of classes is normally packaged in. Typically you create a Class Library, group all your classes as needed and you are done (Professional edition does this for you in a website project). The big problem is Web Developer Edition can't create assemblies.
To run through the tests there are two options, unfortunately both involve downloading the C# edition of Visual Studio Express. After the program is downloaded and installed, you can create a Class Library project.
The first option is to create a Test class with all your unit tests, build, and then add it as a reference in your website project in Web Edition. The second is to move all your classes into separate Class Libraries (assemblies) add references to the test class, and then add your classes as references back in Web Edition.
Either option works mostly. I chose the second option so I could logically group all my classes and run my unit tests and make changes without switching to the other Express Edition. I ran into problems when I started debugging my front-side code because my classes were no longer available inside Web Edition directly.
The first approach probably would solve that particular issue but at the expense of creating more work when writing tests. I can't say which option is better, only that neither is optimal if you appreciate focusing without task ADD.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment