vs comments edit

I’m working on some funky embedded resource stuff where I’m embedding all nature of files into an assembly so I can extract and use them on the fly later. In doing that, I’ve come across an interesting behavior in Visual Studio.

Say I embed two .resx files. One will be called “Strings.resx” and one will be called “Strings.en.resx” - the former is the default set of resources, the latter is the English-specific resources. I set the Build Action on these to “Embedded Resource” to tell Visual Studio to embed them. That looks like this:

Solution Explorer and Properties Window with an embedded resource in

I build my solution and behind the scenes Visual Studio realizes the .resx file is actually resources, does a little resgen action on it for me, and links the generated resources into my assembly. In the build output, I’ll see that I have my primary assembly and a subfolder called “en” that contains an assembly with the English-specific resources I embedded. This is all as expected.

Now rename those files because you don’t want the behind-the-scenes-resgen thing to happen. In fact, let’s call them .js files, just to change things up. Leave them embedded, though.

Solution Explorer and Properties Window with an embedded resource in

I expect that when I build my solution, my final assembly will have two files embedded - Strings.en.js and Strings.js. You know what happens?

You still get two assemblies. The primary assembly has Strings.js embedded in it, and the satellite assembly in the “en” subfolder of your build output has the Strings.en.js file embedded in it, renamed to Strings.js. Not at all what I was expecting.

I suppose you might have thought you could infer that, maybe, from the .NET Framework Developer’s Guide on Creating Satellite Assemblies, but they only talk about the creation of .resources files and how that all gets linked into satellites. No one mentioned anything about a pseudo intelligence splitting things up for me.

I’m not sure I like it. For the project I’m working on, it’s really throwing a wrench in the works, I’ll tell you that.

General Ramblings comments edit

Friday night Jenn and I went over to my parents’ place to watch Mr. and Mrs. Smith (they hadn’t seen it yet) and to pick up the fourth season of MacGyver, which my mom got me.

The plan was originally to have Stu come over on Saturday and have a MacGyver marathon. Something came up and he wasn’t able to make it, but we all got together Saturday night at Stu and Tiff’s place to have some dinner (Stu made some tasty herb chicken and potatoes) and play games. The game of choice that night was Weapons and Warriors.

In this game, each team (Jenn and I, Stu and Tiff) sets up a castle that has all sorts of breakaway features (the windows break out, ramparts come off, etc.). Each person has a crossbow, catapult, or cannon that shoots these little red balls. The object is to shoot down the other team’s castle (actually, it’s to knock down the guys in the other team’s castle, but the goal is effectively the same).

I really don’t know if they should sell stuff like that to little kids. The whole thing got totally out of control - little red cannonballs flying everywhere, people getting shot in the neck (thanks, Tiff!)… and the castles (in some cases) are really too sturdy so it’s hard to knock them down from across the room. After one round, I went over to Stu and Tiff’s castle and had a rough time breaking one of the ramparts off by pushing on it with my finger.

Anyway, like I said, out of control. Tiff ended up finding one of the cannonballs in her school bag on Sunday when she went to her study group. Out of control, and far too much fun. Next time I might have to take some protective eyewear.

Sunday was the MacGyver marathon. Stu came over and we popped season four in. Apart from stopping to go get some pizza and soda, we made it nine episodes in before calling it a night. Tiff ended up joining us toward the end, and Jenn made some awesome Indian food from this cookbook we got a while ago (so the last episode was spent on the leading edge of a food coma).

All in all, a super successful weekend. Onward, to the week!