net comments edit

I just spent a couple of days debugging a weird problem. We have a fairly large product that has several Visual Studio solutions in it, all of which target .NET 3.5. No, that’s not the problem. The problem was that we were able to build each solution separately in the correct dependency order just fine, but when the whole thing ran together in an automated fashion, the build would fail.

The failure message indicated that an extension method was not being recognized. Something like:

'Foo' does not contain a definition for 'Bar'

Again, it would build on its own, but not in the larger environment. What gives?

I figured the problem had to be the targeted .NET environment - that the project was targeting .NET 2.0 when run in the larger build but .NET 3.5 when run alone. And I was right, but not how I thought.

As it turns out, a custom build task run in an earlier build was setting an environment variable called COMPLUS_Version to v2.0.50727, which forced everything after that to run in .NET 2.0.

I had no idea such an environment variable existed. Doing a quick Google search on it, the only documentation on it has to do with build and test environments forcing things to run in different .NET versions, like if you’re building something for .NET 1.1 and want to see how it runs in .NET 2.0. I searched MSDN and other sites, but I can’t actually find any “official” documentation on this. It’s just one of those things you figure out.

Valid settings for COMPLUS_Version seem to be the same as the names of the folders you see when you go to the %WINDIR%\Microsoft.NET\Framework directory, like:

  • v1.1.4322
  • v2.0.50727
  • v3.5

…and so on.

Setting the value will force future processes in that space to use the specified .NET runtime, like:

set COMPLUS_Version = v3.5

That would force everything to run in .NET 3.5.

And we tried that - doing a set to .NET 3.5 to force everything to that runtime, but we then ran into another issue: We were using the vsdbcmd.exe program to do some database work during a build (that’s another story) and if you force it to run in .NET 3.5 you get the error:

To run this application, you must first install one of the following versions of the .NET Framework: v3.5 Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework

That made no sense to me since I obviously have .NET 3.5 installed.

The answer was to get rid of COMPLUS_Version entirely. After the custom build task ran, set the variable, and completed its work, we used the MSBuildCommunityTasks “script” task to unset the environment variable:

<PropertyGroup>
  <SetCode>
<![CDATA[
  public static void ScriptMain() {
    System.Environment.SetEnvironmentVariable("COMPLUS_Version", null);
  }
]]>
  </SetCode>
</PropertyGroup>
<Script Language="C#" Code="$(SetCode)" Imports="System" />

Doing that removes the variable from the process space and later executables can allow the CLR to choose which environment to target automatically.

media, windows comments edit

A little over a year ago I was looking for a storage solution for my tags: [media] center and landed on Windows Home Server. A year in, is it still all I thought it would be?

Mostly.

The Good Bits:

  • Expandability. I’ve upgraded the RAM in it and added a bunch of drives to it. It just keeps getting bigger, and that’s awesome. I don’t have to mess with partitioning things or allocating space to this or that. It just works.
  • Computer Backup. The fact it backs up all of the Windows computers on my network is great. It’s almost worth the price for that peace of mind alone.
  • Redundancy. The “file duplication” thing it uses to store two copies of a file on two physical spindles is great. I don’t worry about a drive going out because I won’t lose my important data.
  • Photo Sharing. I can get to my photo library from anywhere - computer, Xbox 360, Playstation 3 - and it just works.
  • Appliance-Like Functionality. Stick it in the corner, attach to network, plug it in, turn it on. It really is that simple and maintenance-free.

The Decent Bits:

  • Music and Video Sharing. While the photo sharing works great, the whole DLNA/UPnP media sharing bit of Windows Home Server is built on Windows Media Connect, which is unacceptably old. To get newer music types working, you need an additional plugin like Asset UPnP or you need to be accessing the music like a file from a network share. Same thing for video sharing (though I’ve not found a plugin like Asset UPnP for video).
  • Online Backup. Since Windows Home Server is built on Windows Server 2003 but has some differences to it, it’s hard to find an online backup service for it that’s affordable. Mozy, for example, classifies it as a “server OS” so you have to pay the expensive business pricing for it… even if you’re only storing the same stuff on there that you’d normally have on your PC. You end up either paying through the nose or rigging up something to get around the backup restrictions.

The Not-So-Great Bits:

  • File Access Time. Streaming music or pictures works pretty well and I’ve seen no hiccups there. On the other hand, the original intent for this system was to store and serve my DVD library. I’ve got somewhere around 800 discs in my collection (considering a TV season might be six discs, give or take). With 100
    • 200 movies in there (which is where I was testing things), the speed is reasonable and except for a few network hiccups, you could play a full DVD image over the network to a Windows Media Center. Looked beautiful. You get 6TB of storage on that thing with 800 disc images on there and the file access time tanks. I thought my network was just getting bogged down or there was bandwidth trouble since I was seeing a ton of the little “hangs” where the picture and sound would freeze while watching a movie. I upgraded my network equipment and got no better result. It’s totally file access time. As such, I’m going to have to reinvestigate which video format to store my movies in and switch to something a little more network-and-file-access-time-friendly. Unfortunately I think that’ll mean giving up some of the features I was hoping to keep (like the menus and “special features” videos).
  • Developer Resources. I’m a developer and I’ve considered developing a plugin for Windows Home Server (not sure what, but thought it might be interesting) and… there’s pretty much nothing out there on this. Not the major use case for people out there, but still - lame.

Knowing all of that, would I still recommend a Windows Home Server? Sure. The good things far outweigh the bad things. The file access time thing leaves me with a little egg on my face as far as my wife is concerned, though. (“So we bought that and it’s not working?”) Seeing as how the point was to get a functional video library and that’s the part that’s failing right now… well, I’ve got some more work to do.

General Ramblings comments edit

I play the IT guy in my family just like the rest of you geeks out there, but some of the folks in my family have been making strides in learning about tech stuff lately and I’ve been pretty impressed. My mom has figured out how to get on Xbox Live all by herself and play Beatles Rock Band with me online. That’s huge. But bigger still - my Grandpa just recently got his very first email account and has sent his first email. Huge, I’m telling you. I can’t tell you how proud I am of both of them. Great stuff that just makes me smile.

web comments edit

I’ve had to delete a few large directory trees in the last week or so and every time I do there’s trouble. Let me walk you through it.

I navigate to the folder I want to delete, click it, and hit Shift+Delete. I don’t want it to go to the Recycle Bin. Next thing I see is this awesome dialog for the next five full minutes, possibly longer:

"Preparing to Delete"
dialog

This lasts an interminable time and usually around the time I begin wondering what’s up, I realize: the confirmation dialog has popped under something else I’m working on. It won’t even be in a consistent spot. Sometimes it’s on a wholly different monitor than the “Preparing to Delete” dialog.

"Confirm Folder Delete"
dialog

OK, so I click “Yes” because I do want to delete the folder. I go about my merry way. At some point in the next, oh, ten or fifteen minutes, I notice that the progress dialog doesn’t seem to have… progressed. Time to start searching again. And what do I find if I minimize literally everything I’ve got open? Another confirmation pop-under:

"Confirm File Delete"
dialog

Honestly, I thought I’d already confirmed that I want the folder gone. But here we are, and we don’t want to see this again, so I click “Yes to All” and hope for the best. Another five minutes or so later, things are looking hung again… what gives? Minimize everything again. Oh, there it is.

"Confirm File Delete" dialog
redux

Seriously? I could have sworn I clicked “Yes to All” on a nearly identical dialog not… oh, right, five minutes ago. You must have forgotten.

Now, I also hate when dialogs pop up and steal focus. BlackBerry Desktop Manager does that while you’re synchronizing and makes your computer unusable because every focus-stealing dialog has so many hot keys on it that if you’re typing an email, you’re bound to hit some hot key combination that formats your BlackBerry if the dialog pops up and steals focus.

What about having the confirmation dialog show up in the task bar and flash?

That way I would be able to see something is demanding my attention without needing to minimize everything, and if it pops up in a place I’m not expecting, I can easily switch to it by selecting it in the task bar.

I’m on WinXP right now at work (don’t ask, I don’t like it, either). Did this get fixed in Vista or Win7? Doubting it.

General Ramblings comments edit

It’s been a bit over a year since I posted about my hair removal progress and as I just finished up treatment #26 a week or so ago, I thought I’d recap a bit… if anything, as a note to self.

I started the process of getting my facial hair removed a little over two years ago. My facial hair is, to put it mildly, very coarse and causes all nature of dermatological issues if I let it grow even a little bit, not to mention it destroys sheets, pillowcases, necks on shirts, etc.

Hair removal is painful. Don’t let anyone tell you otherwise. The more coarse your hair, the worse it is.

To that end, I started the first few treatments using a Dermo Flash, which is a less painful, more broad-spectrum sort of hair removal system. That helped to thin things down, but after the first few treatments we saw diminishing returns because it wasn’t powerful enough. I then switched to a MeDioStar laser-based treatment which was much more effective but also much more painful.

Since then, I’ve been alternating between the MeDioStar and a Syneron eLaser that combines laser and radio frequency. I’ve been having good results with this, with some spots on my chin and upper lip being the only stubborn areas we’re still working on.

Something to think about if you’re considering getting this done: You’re in for the long haul. That’s not just if you’re getting your face done, but anywhere. They can do a lot in a few treatments, but you’re not going in for five or six treatments and calling it good if you want to actually clear an area out. And once you’ve started, you can’t really turn back because you start getting patchy and it doesn’t look all that great.

Also, even today, it still hurts. Not nearly as bad as it did in my first treatment, but it hurts. On the upper lip it’s enough to bring tears to your eyes.

Had I known all that… I probably still would have done it. I don’t get the nasty ingrowns like I used to, I don’t tear up my pillowcases anymore, and I can kiss my wife without removing the top layer of her skin with my sandpaper beard.

I have a few more treatments (a total of 30) and we’ll see where I’m at then.