Who called me?

Here is a cool little code snippet with done with reflection that actually is quite handy. Especially in a logging situation. I tweaked the code a bit to be not “WhoCalledMe” but rather “WhoIsTheCallerOfMe” and as such could hide most of the logging in a base class. This is easily done by changing the row StackFrame stackFrame = stackTrace.GetFrame(1); to StackFrame stackFrame = stackTrace.GetFrame(2); Of course then you’ll have to check that the frame in question (2) exists.
Read More

ScrumIndexCardCreator - my first CodePlex project

After reading about some great stuff that other people has published I decided to take the leap and publish my first project. The one I decided on was a small utility that I have had great use of - the Scrum Index Card Creator. You can read about, and contribute to, the project and the application here http://www.codeplex.com/ScrumIndexCard. So… this Scrum Index Card Creator is the first official release from Marcusoft. I wonder where is might end…
Read More

Cool WCF-utils

From the last post I found a new URL for code stuff from MSDN that I never heard about before. But this place is golden, golden I tell you. Here are two small nuggets that I found in my first try: http://code.msdn.microsoft.com/FileTransportChannel> http://code.msdn.microsoft.com/WCFExtras> - that contain, among other things, an implementation to get WSDL in a single file (that Christian Weyer does here)
Read More

I like PowerCommands for Visual Studio 2008

Just found these PowerCommands for Visual Studio 2008 , which looks very promising indeed. They are a collection of nice-to-have-features in Visual Studio, that are missing from the start. My first two favorites are; Collapse projects in Solution and Copy and Paste Project References. These two commands alone are worth the download time… It seems like not all of the commands is applicable for all languages, like “Remove and sort using” that doesn’t work in VB.NET (of course ;)), but there are still usable stuff in there. Get one now!
Read More

Validating WCF-messages with WSDL

When you first think about it, it’s quite strange that no validation, takes place out-of-the-box ,against the WSDL that describes a service (asmx or WCF). Then you (read: I) forget it and all of a sudden you don’t think that much about it; the generated proxy or services code doesn’t contain logic. Period. It’s even more so when you only create services that is generating WSDL when asked. BUT (and it’s a big but ;)) - when you start doing Contract First you are actually specifying the WSDL first and then generate the code… then the question arises again. I mean you’re specifying things in the WSDL that doesn’t get generated into the code. Things like format, lengths and stuff like that. It’s a bit strange that it’s lost. And the best scenario is that it’s simply validated when the request is received. Lo and behold - here is mr...
Read More

Sweden in 3D

The foremost telephone number search service in Sweden, www.hitta.se , has launched a new service that displays maps of the four biggest cities in Sweden in 3D. It is still in beta (and as such quite slow) but it’s really cool. Of course it’s a Google earth rip-off but it has a few advantages; it runs in the browser, its genuine pictures of the buildings and no models and it’s very high resolution. Here you go - Sweden in 3D.
Read More

Creating link to TFS Reports in build script

For a few days (on and off, not continously) I’ve been searching the net for some way to present code coverage data in a nice way. That is - when our build script is running tests under code coverage we don’t present the code coverage result. The code coverage data is located in the TRX-file generated by MSTest. And there is a great tool, trx2html, that I’ve already blogged about. But that tool doesn’t show the any code coverage result. Here I must add that I know these two things: firstly the main part of the code coverage data is only interesting to the developers and might not benefit from being shown to others. But I just want to show that 97% of our code is covered by out unit test. Calms the project management… secondly - it might be a simple thing to tweak the internal XML Transformation of...
Read More

Run as for MSI-files

I am hitting them as I go along - here is another tip that is very useful. A .MSI-file cannot be executed under another account then the one you’re running with. There is no “Run as…” in the right-click menu for .MSI-file, in other words. Here is the solution for Vista which works very good on XP also (I’ve tried). It is a reg-file that simply adds the “Run as …“-feature when right clicking .MSI-files
Read More

Getting dates automatic in Notepad

Just passed this “trick”. You’d think that everything that there is in notepad was known… This is cool and could also be handy for creating a manual notebook or diary . Open a blank Notepad file Write .LOG (in uppercase) in the first line of the file, followed by Enter. Save the file and close it. Double-click the file to open it and notice that Notepad appends the current date and time to the end of the file and places the cursor on the line after. Type your notes and then save and close the file. Each time you open the file, Notepad repeats the process, appending the time and date to the end of the file and placing the cursor below it. Check it out
Read More

TESTTOOLSTASK warning VSP1024 Unable to open file file for writing.

This warning occurs when doing testing with MSTest and running the test under code coverage. It is related to the warning “warning VSP2013: Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this.” and has confused me a lot. Especially since, when running the tests in a build script, the warning seems to come and go. No fear; the solution is quite simple (thanks to this excellent forum post); here is what you need to do: Find the test configuration file you’re using for the test run under code coverage. It is usually called LocalTestRun.testrunconfig and resides in the solution root. Open the file in a XML-editor Find all the CodeCoverageItem-elements change (or add) the attribute instrumentInPlace from “true” to “false” Save and rerun - works like a charm But hey, I can hear some people say, what is...
Read More