Scott Hanselman

Exporting Resources from a Resource-Only Assembly

November 01, 2005 Comment on this post [0] Posted in Learning .NET
Sponsored By

I needed to compare two resource-only satellite assemblies to see what strings had changed. Sometimes we need to update a string here and there and QA needs to know exactly what changed. Here's a quick "ResourceExporter." It will export stuff in a name=value format, which can, by the way, be turned back into RESX files using resgen.exe. No warrenty express or implied. I've run it successfully on the two assemblies I was comparing. Your Mileage May Vary.

    1 static void Main(string[] args)
    2 {
    3     Assembly a = Assembly.LoadFile(Path.Combine(System.Environment.CurrentDirectory,args[0]));
    4     string[] resources = a.GetManifestResourceNames();
    5     using (StreamWriter strWriter = File.CreateText(
Path.Combine(System.Environment.CurrentDirectory,args[0]+".txt")))
    6     {
    7         foreach(string resourceName in resources)
    8         {
    9             using(Stream str = a.GetManifestResourceStream(resourceName))
   10             {
   11                 using(ResourceReader reader = new ResourceReader(str))
   12                 {
   13                     foreach(DictionaryEntry entry in reader)
   14                     {
   15                         strWriter.WriteLine(String.Format("{0}={1}", entry.Key, entry.Value));
   16                     }
   17                 }
   18             }
   19         }
   20     }
   21 }

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Offline Blogging packages that are compatible with DasBlog

November 01, 2005 Comment on this post [5] Posted in DasBlog
Sponsored By

John Forsythe has a nice list of a number of Offline Blogging packages that work directly with DasBlog via the Blogger or MetaWebLog API.

Here's the ones he got working:

Personally, I use (and can't say enough nice things about) BlogJet for ALL my posts. It's fantastically easy to get working with DasBlog as has a pre-configured setting for DasBlog. It supports pre- and post-dating of posts, categories, has fantastic imaging support and automatic thumbnail generation. It also supports Music Detection (adding what you're listening to to the bottom of the post) along with Voice Attachments (a recorder is included) and overcomes the Blogger/Metaweblog APIs lack of support for attachments by using a parallel FTP upload. Very slick.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Logitech IO2 Pen - .NET Support, Google Desktop Support, and Upcoming Article

October 31, 2005 Comment on this post [2] Posted in Reviews | Coding4Fun
Sponsored By

9102I really respect a company that not only releases a great product, but also updates it to include new functionality. Especially with just new software. The Logitech IO2 pen is a really cool idea. The original IO was ahead of its time, but I loved using it. I actually sold it on eBay and now use the Logitech IO2.

The new IO2 is smaller, has a longer battery life, more memory, and more importantly it's more pen-like. I recently updated from version 3.3 to 3.5 of their software and it includes very clever new technology they call "ioTags." My first thought was, hm, smart tags for a pen? This is actually cool because it works the way my brain does. I typically cover a page in notes and then only a section of the paper needs some action - an email, a calendar appt, etc. Their tag concept has you circle a capital letter (the action, like "E" for email) and draw a vertical line down for context.

I also noticed that they have released a Google Desktop Search Plugin that makes their .PEN files searchable via Google's local search. It looks like Google Desktop Search is so popular that you really MUST release a filter for your file's format or you'll be left out in the cold. All the better for the user.

Not only that, but they have a .NET SDK available to extend the pen! It's been on my queue for a while, so long in fact that it's embarrassing.

I'm writing an upcoming article for MSDN's Coding4Fun where I extend the IO2 Pen with direct support for blog posts from the pen. I hit a snag with all the .NET 2.0 betas on my system, but I'm back in business. What better combination but blogging and a digital pen?

IDEA: Can we extend PocketMod with Anoto paper/pattern support for pens like the IO?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Craptastically Useless Stuff - How much is your blog worth?

October 31, 2005 Comment on this post [7] Posted in Musings
Sponsored By

This may well just be a random number generator. Hey, anyone want to buy my blog?


My blog is worth $403,646.10.
How much is your blog worth?

 

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Svchost.exe Sucks CPU and Rebulding the WMI/WBEM Repository

October 31, 2005 Comment on this post [5] Posted in Musings
Sponsored By

Lately I've been seeing one particular svchost.exe sucking CPU. There always a number of in-proc running inside of each of the many svchost (Service Host) instances. Using ProcEx, I figured out the PID of the specific instance. Then, I right clicked within ProcEx, hit Properties, and under the Threads tab noticed that wbemcore.dll was working REALLY hard.

Crap, time to re-schmutz WMI's repository. So, I stop WMI from the command line with :

net stop winmgmt

Then I deleted the Repository directory in c:\windows\system32\wbem\ then started again with

net start winmgmt

Then I re-stored/compiled all the .mof (Managed Object Format) files with a batch file containing this one line:

for %%i in (*.mof,*.mfl) do Mofcomp.exe %%i

Now I'm back in business.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.