dotnet, vs comments edit

I’m in the process of updating a bunch of old Visual Studio 2003 projects and solutions to, well, something a little newer. I found this odd behavior issue where there were some references that were marked to as “Copy Local” and that would work fine in a Visual Studio build, but when run from MSBuild, the references weren’t getting copied correctly, which would cause unit tests to fail and such because things weren’t where they should be.

A little Googling led me to this forum post which basically boils down to:

Go through your projects in a text editor and look for references with <Private> tags in them. Like <Private>True</Private> or <Private>False</Private>. “Private” is a synonym for “Copy Local.” Somewhere in the actions MSBuild is taking to locate dependencies, it’s finding your dependency somewhere else and deciding not to copy it.

What I ended up donig is going through each converted .csproj file and removing the <Private> tags manually. Rebuild, and everything works in both Visual Studio and MSBuild. Once you’ve got that working, you can go back in and update things to where you think they need to be, and when things start failing, you’ll know exactly where the problem is.

downloads, build, dotnet comments edit

Anymore, if you want to generate documentation, you’re using Sandcastle along with, most likely, some community-generated wrapper for it so you’re not manually executing the bajillion steps Sandcastle requires to get things done. (Wow, that didn’t sound bitter at all.) I use Sandcastle Help File Builder for several projects and like it a lot.

When Sandcastle generates its reflection information (so it can properly resolve links in your docs), you need to tell it where it can find third-party dependencies so it can generate the information it needs. All of this has to happen on the command line (no, there’s not currently a config file option for this), which means when your project gets to be of a significant enough size, you start running into command line length limitations. Sandcastle Help File Builder addresses this by copying all of your dependencies locally into a temporary folder and passing a single dependency location (that folder) to Sandcastle.

That works great… until you run into an issue where you inadvertently rely on multiple versions of a single dependency.

For example - say you have a custom NAnt task project with a compile-time dependency on log4net 1.2.1.40796 and NAnt 0.85.2344.0. NAnt 0.85.2344.0 has a reference to log4net 1.2.9.0. What that means is, unfortunately, that Sandcastle needs access to both versions of the log4net.dll. What it further means is that when Sandcastle Help File Builder tries to copy both versions locally to help you with the dependency thing, there can be only one and Sandcastle dies a miserable death telling you that it can’t find the reference.

How do you resolve that?

Luckily, Sandcastle Help File Builder has a plugin model that allows you to swap in your own behavior for various stages of execution, and that’s what I’ve done.

Since Sandcastle needs the assembly metadata and it doesn’t matter what the physical filename is, I’ve replaced the existing dependency copy routine so that it still copies all of your specified dependencies but it copies them with GUID filenames - so you can have more than one version of a dependency without having a filename clash. Sandcastle resolves the dependencies correctly (it literally just iterates through all of the copied dependencies and caches the metadata) and docs get generated. Peace on Earth is restored.

The plugin copies your dependencies with GUID
filenames.

To use it, just drop it in the PlugIns folder in your Sandcastle Help File Builder installation location. More on using plugins with Sandcastle Help File Builder is included in the SHFB documentation. (Basically, put it in the folder and SHFB will pick it up automatically.)

Grab the compiled version, the source (with unit tests), or both. Free, as usual.

[Download Paraesthesia.SandcastleHelpFileBuilder.Plugin 1.0.0.0 Compiled]

[Download Paraesthesia.SandcastleHelpFileBuilder.Plugin 1.0.0.0 Source]

Version History: 1.0.0.0: First release.

General Ramblings comments edit

Sunday Jenn, I, and our friends Angela and Keaka gathered up in the Wagon Queen Family Truckster and headed down to Lincoln City, OR. Every year they place a bunch of glass floats up and down the beach, and Angela’s totally into floats, so we went to help her find one.

After a couple of hours walking around on the beach, searching with the other treasure hunters, we came up empty-handed. I was tempted to run to a local shop and just buy a float and then hide it in the sand somewhere to “find,” but I couldn’t sneak away. Somehow I think Angela would have known anyway and probably given me a stern talking-to.

Next time I think I want to blow my own glass float, though it costs like $65 to do it. I think it’d be a pretty neat experience and you’d get to take something cool home. I’ve never blown glass before. I did get myself some Mo’s clam chowder, which is always worth the trip. And now, back to work!

General Ramblings comments edit

Saturday was my seventh in a series of laser hair removal treatments for my face. I had some excellent results from last time and my facial hair is getting pretty noticeably patchy. Especially at the end of the day, I get sort of “five o’clock dirty-face” now since it’s less “shadow” and more sparse. (I went to the dermatologist the other day and forgot to mention I was getting the treatments. He was all, “I don’t remember you mentioning you had really bad acne when you were younger…” It’s pretty patchy.)

The area around my mouth is being a little stubborn, but my chin is the thickest/coarsest hair on my face, so that’s to be expected, and we hadn’t done the MedioStar laser around my lips because that’s apparently the most painful area. To remedy some of that, this time we did MedioStar around the lips (not actually any more or less painful than anywhere else) and went over my chin twice. We also did full face with the DermoFlash IPL. We should be getting some great results this time, though my face burned for a day like a bad sunburn and it hurts to shave because it’s very tender. My patchiness is also far more visible this morning because I have a small amount of bruising, which is not uncommon and generally goes away in four or five days.

Treatment is getting noticeably less painful every time. I’m pretty sure that doing the DermoFlash for a few treatments was the right way to go (for me) because it thinned things out enough that the MedioStar became bearable. They also fairly recently got this cold air machine that blows supercooled air and freezes you right up, making things, again, more bearable. It beats the crap out of putting ice on your face, which doesn’t work.

GeekSpeak comments edit

The Verizon Fios installers just left, and I’ve got my 15mbps up/2mpbs down running in full form. Got everything transferred over to use the Verizon router and Xbox Live, my primary network problem child, seems to be working swimmingly.

15494kbps download/1847kbps
upload

Of course, it didn’t come off without a hitch - the person taking our order mistyped the phone number, so the installers couldn’t really transfer our phone number from Comcast to Verizon because the paperwork didn’t match. So now we have Verizon video and data, and we have both Verizon and Comcast phone. How does that work? Verizon is actually hooked up and running but with the wrong phone number. We’ve had to temporarily keep the Comcast voice service, even if no Comcast junk is hooked up, so we don’t lose our number. It will take a week of futzing around through annoying phone trees and fighting with service people who can’t get off the standard script in order for us to get the number switched. A week to do a two minute job.

Oh, Verizon. I knew you had horrible customer service, and so far, well, I wasn’t wrong.

I like the menus and the TV features a lot better than the Comcast stuff. The UI is far slicker and has a lot of little helpful things in it than the Comcast one did. The net connection seems pretty nice, too, but I can’t really speak to it much since I’ve only written this blog entry and gotten things basically connected. We’ll see how she goes soon.

Oh, and it’s like $50/month cheaper, which doesn’t hurt.