Archive for February, 2008

Windows 2008 – 3 things I wish I had known…

Ok, so I decided to setup a new VPC image with Windows 2008, SQL 2005, WSS 3.0 and Visual Studio 2008. Basically everything is going quite well, but there are a couple of things I encountered while installing, that I thought I would share.

1. Installing SQL Server 2005 with Reporting Services

w08_features From previous experience I knew that Reporting Services requires IIS if you want to install it. The first thing you notice that the server manager has changed a little. I went ahead and installed ASP.net and the Application Server which also installed IIS, but when I started my SQL Server Setup Reporting Services was disabled, so there was something wrong with the IIS install. It took a few minutes, but it seems you actually have to install the IIS role separately. (I had chosen ASP.net, and activated further options manually.) Anyway once the following picture appeared I was set to restart my setup. This time no problem.

2. Internet Explorer Enhanced Security

I don’t like it, so I always go and uninstall it after finishing my base setup. (Usually when I start downloading stuff I need to install.) So I go to my Control Panel, go to Programs & Features and click on Manage Windows Features. Woha, the server manager appears. Ok, this is different to Windows 2003. I think it was David Platt who said something along te lines of “If you want people to use it, make it obvious. If you don’t want people to switch it off, hide it”. Well done, it’s hidden.

It took a bit of googling (sorry, but live’ling just doesn’t sound well as a verb) to find the right option to change. The feature is called IE ESC which can be found in the overview page of server manager. Now I know, now you know.

w08_ieesc

3. Installing Windows Sharepoint Services 3.0

Ok, I live’d for “Windows Sharepoint Services 3.0″ (I really did use live this time.) and downloaded the package. Started Sharepoint.exe and voila “This program is blocked.”. WTF? I read on and it asks you to install the setup package with the latest service pack and won’t accept anything else. Ok, my mistake, don’t blindly take the first link presented (I bet google would have pointed me to the service pack 1 download package – but I didn’t check).

Turning a class library project into a MSTest project (or using MBUnit, MSTest and other frameworks in one project)

I know it’s been a while. I’ve been busy talking about SyncFramework at the VSOne conference, helping a bit of at the Sync Framework forums and lot’s of studying going on. I promise I have some new longer posts coming soon.

Yesterday I wrote a unit test that I wanted other members on my team to execute this week to check for some problems. Where’s the problem you may ask? Well I personally like TestDriven.net and MBUnit whereas my colleagues rely on the testing suite in Team System. Fair enough, usually we don’t exchange that many tests (and no – I’m sorry about that myself actually – we don’t have continuous integration. But even if we did that probably wouldn’t be a major problem).

Anyhow I created my class library project and wrote my test. Worked great on my computer (don’t hit me for saying that). I then remembered that it needed to run under MSTest on the other dev machines. Fair enough, can’t be that hard. I referenced

Microsoft.VisualStudio.QualityTools.UnitTestFramework

and gave my methods additional attributes. (The top ones are MSTest, the bottom ones are MBUnit.)

[Microsoft.VisualStudio.TestTools.UnitTesting.TestClass]
[TestFixture]
public class EvaluatorTestSuite 

[Microsoft.VisualStudio.TestTools.UnitTesting.TestInitialize()]
[TestFixtureSetUp()]
public void SetUp() 

[Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanup()]
[TestFixtureTearDown()]
public void TearDown() 

[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod]
[Test]
public void Evaluate_ValidEvaluationModel_ReturnsValidEvaluationResult()

Then I went to the Test menu in Team System and wanted to execute all tests in this solution. But VS told me there aren’t any. Basically I figured out the test projects must have some special attribute that make them “testable”. They are basically just class libraries but they have a special Guid in their project file. Not quite sure why Microsoft would do that, seeing as they could just check for the attributes on the classes like TestDriven.net does, but ok. This is a quick solution to turning a class library into a MSTest testable project. Open the CSproj file of the class library project and just before the first propertygroup closes insert the following line:

<ProjectTypeGuids>

{3AC096D0-A1C2-E12C-1390-A8335801FDAB};

{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

</ProjectTypeGuids>

Those two guids make it MSTest testable. And no, I didn’t have time to figure out why there are two and what they do exactly. If anybody cares to explain, I would love to hear about it. The file should look something like this:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{5273D187-1B0D-40DC-A415-36761976438B}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>TheGrandestProjectOfThemAll</RootNamespace>
    <AssemblyName>TheGrandestProjectOfThemAll</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  </PropertyGroup>

Technorati Tags: ,,


Subscribe / Search


XING

 

February 2008
M T W T F S S
« Jan   Mar »
 123
45678910
11121314151617
18192021222324
2526272829  

Twitter

Blog Stats

  • 356,722 hits

Follow

Get every new post delivered to your Inbox.

Join 57 other followers