BC31094 Error with MSBuild but not Visual Studio

August 22nd, 2008

Here’s one of those things that “can’t possibly happen” but does. The project builds fine under the Visual Studio 2008 IDE, but if I run it directly under MSBuild.exe it fails with the error

error BC31094: Implementing class 'MMCLTSVCS.FooClass' for interface 'MMCLTSVCS.Foo' cannot be found.

The key is that the error involves calling a COM object. The project contains a reference to the interop for that COM object: Interop.MMCLTSVCS.dll. However it does not contain a reference to the interop for one of the other COM objects that Interop.MMCLTSVCS.dll uses. Apparently this works fine under the IDE but fails with an obscure error message under MSBuild.

Visual Studio’s “Unused References” function provides an easy way to get this error. It will helpfully remove any references that are not used by your .NET code, without considering whether they are used by any of the referenced interops.

Ed Foster, 1949-2008

July 30th, 2008

Consumers of digital hardware, software and services lost their most tireless advocate last week when Ed Foster died of a heart attack.

EFF’s Fred von Lohmann provides an obituary:

In Memoriam: Ed Foster, 1949-2008

Application Configuration Error Converting to .NET Framwork 2.0

May 20th, 2008

I converted an old console app from .NET Framework 1.1 to 2.0 using Visual Studio 2008. When I ran it I got the following helpful error message

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

Looking in the Security Event Log I found the following messages:

Generate Activation Context failed for C:\ParsII\bin\server\CCSWinService2.exe. Reference error message: The operation completed successfully.

Syntax error in manifest or policy file “C:\ParsII\bin\server\CCSWinService2.exe.Config” on line 1.

The last one was the key. In the app config file the first line was

<?xml version="1.0" encoding="Windows-1252"?>

That should be perfectly legal for an XML file, but deleting it caused everything to work perfectly.

Flashing the Windows Taskbar Button Forever

May 12th, 2008

Raymond Chen explains in detail how to be a jerk.

Freedom in China vs the US

April 25th, 2008

Elliotte Rusty Harold has just returned from China and posts this disturbing comment:

Reflecting back on my recent trip to Beijing…one of the most striking things was the contrast between personal, day-to-day freedom in Beijing and the United States (especially NYC/Los Angeles/Orange County). I’m not talking about political representation or freedom to read whatever I felt like, but just the simple ability to go whereever I felt like going without being hassled. To my surprise, by that measure Beijing came off way better than the United States does these days, and that doesn’t speak well for the U.S.

Somehow I thought a one-party, authoritarian state would be more oppressive than this. At least in the capital, Beijing compares favorably to major U.S. cities. To be honest, that doesn’t speak well for the U.S. If we can’t be less of a police state than a one-party, nominally Communist nation like China, then something has gone seriously wrong.

(Read the whole thing)

Back during the Cold War, right-wing types used to make a big distinction between “totalitarian states” (bad) and “authoritarian states” (not so bad.)

A totalitarian state (Russia, China or Nazi Germany) would try to monitor everything its citizens did and demanded constant declarations of effusive loyalty. An authoritarian state (Franco’s Spain) would generally leave people alone if they kept quiet and stayed out of politics.

By this definition China has clearly become an authoritarian state. But if America is becoming more of a police state than China (in terms of surveillance, etc.) then what does that make us?
Read the rest of this entry »

The FBI Wants to Monitor Your Web Browsing

April 25th, 2008

Declan McCullagh has a detailed analysis of FBI Director Robert Mueller’s recent Congressional testimony in which he asked for greatly expanded surveillance powers. Currently the FBI has the technical ability to monitor just about everything that goes over the Internet, but they need to get a warrant (or a secret National Security Letter) in order to do so.

Mueller wants to convince the Internet Service Providers to change they Terms of Service to force their customers to “consent” to having the FBI monitor everything they do without a warrant. If the ISPs refuse (as they probably would for fear of lawsuits) then he wants Congress to pass legislation requiring it.

He justifies this by invoking the usual suspects (terrorism and cyberattacks) but of course the surveillance would be quickly extended to cover lesser crimes like copyright violation. It is amusing to imagine the FBI locking up millions of file sharers, but probably they would just prosecute a small number of people to serve as examples.

Bruce Schneier’s Twisted Mind

March 24th, 2008

SmartWater is a liquid with a unique identifier linked to a particular owner. “The idea is for me to paint this stuff on my valuables as proof of ownership,” I wrote when I first learned about the idea. “I think a better idea would be for me to paint it on your valuables, and then call the police.”

If more people had a security mindset, services that compromise privacy wouldn’t have such a sizable market share — and Facebook would be totally different. Laptops wouldn’t be lost with millions of unencrypted Social Security numbers on them, and we’d all learn a lot fewer security lessons the hard way. The power grid would be more secure. Identity theft would go way down. Medical records would be more private. If people had the security mindset, they wouldn’t have tried to look at Britney Spears’ medical records, since they would have realized that they would be caught.

This seems a little grim, but it would be a useful counterbalance to the general tendency to enthusiastly embrace any plausible-sounding proposal without thinking through the consequences.

Stylesheet Changes

March 23rd, 2008

After testing the site with Safari for the first time I ended up making some massive, long-overdue changes to the stylesheet, which hopefully will allow things to display better in more browsers and screen resolutions.

In particular I eliminated the use of pixel metrics, replacing it with logical sizes (inches and points.) I also reduced the dependence on bitmap images for formatting and fixed some malformed relative URLs, which Firefox and IE handled correctly but Safari didn’t like.

If the site now looks WORSE in your browser, let me know what your configuration is and I’ll see what I can do.

E-voting vendor blocks security audit with legal threats

March 20th, 2008

Problem: the voting machines report numbers that don’t add up.

Attempted solution: local authorites commision an independent audit of the machines to determine the source of the problem.

Checkmate: the vendor prevents the audit by threatening to sue to protect its “Intellectual Property.”

Story on Ars Technica.

This is exactly why all voting machines should be required to use open source software throughout: to make sure that effective audits will always be possible. Of course no commercially available voting machines actually do this. As always the industry’s motto is “Trust us. Shut up. Just trust us.”

UPDATE: A judge orders the review to proceed, although the report won’t be available in time to do anything about it before the November elections.

Grace Hopper’s “Bug”

March 14th, 2008

“Robert X. Cringely” (Mark Stephens) repeats and debunks the story the Admiral Grace Hopper invented the term “bug” (refering to computer problems.)

Actually I’m pretty sure that she never intended to claim that she invented the term. That is a misunderstanding imposed by others. She just said that she found “the first genuine computer bug,” meaning the first bug that was actually an insect.