VS2008/3.5 SP1 == Fail

Ok, so its been about a week of running SP1 on vs2008 and all i can sy is: “WTF?!?” There is no need to list the bugs, as the interweb is chocka full of them (including a couple I have posted to the conect team), but I must say that I have been incredibley underwhelmed. When i install an SP i dont expect everything to break. This is the worst release i have encountered from M$ in a while. I am really dissapointed in a team that i thought was on the up and heading in a new positive direction. 😦

VSX

I have just managed to install IronPython on my work PC… but not easily.
None of the problems stem from Iron python, just from the VSX installation.
You would think after years of releasing software M$ could get it right.
You have to download the VS Shell extensions (vs_AppEnvRedist.exe). you then have to install the application(?!?) (vs_shell_isolated.enu) which may install the .net frameworks that are required (this is good!), then you can install the IronPythonStudio, which installs fine.
Why could the VSX installation be one step? Click on the exe and it installs, cleans up the crap left scattered through my c: drive and then let me know we are good to go!

Not a big issue, but one that should not even exists.
Anyway IronPython is going to get a little tyre kicking now 😉

Where are my Visual Stuido templates?

On both my Work and home PC recently i have lost all of my VS 2005 file templates. These are the template that dump all the default stuff intot he file when you click “add new… class” or “add new… web control” etc
As i install new stuff all the time, mainly just to kick the tyres, it is hard to point the finger at anything in particular…so iwont, either way it has pissed me off.

Any way if you find you have this issue:

devenv /installvstemplates

is the command to get you back on track.

This seems to happen when new templates have been added (ie you have added a new framework, just as a .net upgrade, or new test framwork etc

Code snippets… yay!

I am starting on a new project without resharper… so i have to write alot more code than I am used to… enter VS intellisense code snippets!

Here is a very basic one I have for NMock;




Create a NMock Test
Create a NMock Test using mocks to improve testability.
Rhys Campbell
testmock




IMockClass
Replace with the type of interface of the mocked object.
Interface


mockObject
Replace with the name of the mock object .
mockObject


TestObject
Replace with the type of the test object .
TestObject


testObject
Replace with the name of the test object .
testObject


MethodToBeTested
Replace with the name of the test method to be called .
MethodToBeTested



<![CDATA[
[Test]
public void TestExpect()
{
// mock the dependency by way of interface
IMock $mockObject$ = new DynamicMock(typeof($IMockClass$));

// setting up values
$mockObject$.ExpectAndReturn(“Mock object expected method call”, “Mock object expected method return value”); //remove and replace with appropiate expectation. NB: NMock uses strings not strong naming for it method calls.

$TestObject$ $testObject$ = new $TestObject$(($IMockClass$) $mockObject$.MockInstance);
AssertEquals(“Some sort of valid repsonse”, $testObject$.$MethodToBeTested$()); //replace with approriate test

// Verify that mock expectations are met
$mockObject$.Verify();
}
]]>



(you may want to format that) 😉

As per the M$ site:

Before you can begin writing your code snippet, you must create an XML file with a .snippet file name extension.
To create a .snippet file

  1. On the File menu, click New and then click File.
  2. Click XML File and then click Open.
  3. On the File menu, click Save .
  4. In the Save as type box, select All Files (*.*).
  5. In the File name box, enter a file name with the .snippet file name extension.
  6. Click Save.

What they dont say that you should save it somewhere that VS will know where to find it. the easiest is My documents\Visual Studio 2005\Code Snippets\Visual C#\My Code Snippets\
this is where VS looks by deafult, this means you dont have to import it it is just ready to go.
so to get the code to work just type in:
testmock
in any C# file and *Bam* there is you intellisense code block ready to fill out.

this propbaly wont change you life but its certainly a nice to have, espeically without my blessed ReSharper…

For more info: Go to the MSDN site

-oh the imports staements dont work in C# so i cant import my testing namspaces which sucks…