Expert Texture Home Contact me About Subscribe Digipede Connect on LinkedIn rwandering on Twitter

Expert Texture

The blogged wandering of Robert W. Anderson

Archive for September, 2005

Changing CLR Version with ILMerge

Here is a trick that I found while looking at ways to handle .NET 2.0 while continuing to support .NET 1.1. The obvious way to support both is to build with VS2003 and use application configuration to direct the loader to prefer .NET 2.0 if available:

<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedruntime version="v2.0.50727">
      </supportedruntime><supportedruntime version="v1.1.4322">
    </supportedruntime></startup>
</configuration>

That is OK, but what if you want to bind your assembly to .NET 2.0 and you don’t have the time to re-engineer your build and release processes?

OK, that is a lot of ifs, but it occurred to me that maybe ILMerge might work. ILMerge merges multiple assemblies into one, but what if it works with a single assembly? It turns out that it does:

  ilmerge input.dll /out:output.dll

creates a new assembly that is bound to the CLR that ILMerge is running. Of course, it is stripped of its strong naming key and signcode key; so you have to deal with this seperately.  The good thing is, though, that all of your resources (both managed and Win32) are in your resulting PE.

Of course, you can use ildasm and ilasm to do this too, but it takes more steps (or at least more attention to the arguments) to get the intended result.

Tags: , ,

FileInfo behavior change in .NET 2.0 Beta 2, fixed in RC

The other night we were performing tests of the Digipede Network on .NET 2.0 Beta 2 and came across an unexpected failure. The failing code instantiated a FileInfo object with the fileName argument of a nonexistent file. Then the code read the Attributes property. This resulted in the following exception / stack trace:

Unhandled Exception:
  System.IO.FileNotFoundException:
  Could not find file 'xxxxx'.
  File name: 'xxxxx'
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath
      at System.IO.FileSystemInfo.get_Attributes()

The code was supposed to read Attributes only if Exists was true. This was clearly a logic error, but my first question was: “How does this ever work?” As I didn’t have time to look into it further, I just went ahead and fixed the problem.

Today I tested this code again in .NET 1.1 and found that Attributes returns a default value (all bits on) even when the file cannot be found. I looked this up in the BreakingChanges.chm (that hasn’t been updated since May) and found no reference to this change in behavior.

I decided to test it again on .NET 2.0 Beta 2 (v2.0.50215) and confirmed again that I get the above exception. This appears to be an unintentional breaking change to Beta 2.

Then I tried it with the .NET 2.0 RC (v2.0.50727, the one from the Visual Studio 2005 RC that was handed out at ). This time it worked just like it did in .NET 1.1.

So, the problem came and went.

I figure that the Beta 2 behavior was reasonable; however, the CLR team apparently (and, I think, correctly) prefers compatibility.

Here is the code sample I used to test this out:

using System;
using System.IO;

namespace FileInfoTest {
  /// 
  /// Summary description for Class1.
  /// 
    internal class FileInfoTest {
    /// 
    /// The main entry point for the application.
    /// 
    [STAThread]
    private static void Main(string[] args) {
      // check arg length
      if (args.Length != 1) {
        Console.WriteLine(”Usage: FileInfoTest file”);
        return;
      }
      // get FileInfo
      FileInfo fileInfo = new FileInfo(args[0]);

      Console.WriteLine(”Exists:\t{0}”, fileInfo.Exists);
      Console.WriteLine(”Directory:\t{0}”, fileInfo.DirectoryName);
      Console.WriteLine(”Name:\t{0}”, fileInfo.Name);
      Console.WriteLine(”Attributes:\t{0}”, fileInfo.Attributes);
      Console.WriteLine(”LastAccessTime:\t{0}”, fileInfo.LastAccessTime);
      Console.WriteLine(”LastWriteTime:\t{0}”, fileInfo.LastWriteTime);
    }
  }
}

Tags: ,

My interview with DOC | HOLLADAY

I talked with David Holladay at  (i.e., DOC | HOLLADAY). Today he published the interview here.

I talk a bit about what Digipede does and what makes our product different from other Grid offerings out there.  I also talk a little bit about the background of my team and what got us interested in this market space.  At least I think that is what talked about — I haven’t watched the interview myself!

Tags: , ,

Dan shows off the Digipede Network

Dan’s “Grid Computing for Windows” show-off video was just posted on Channel 9.  Check out how easy it is to grid-enable your applications with the Digipede Network.

Good job, Dan!

Tags: ,

From MTC to eScience

Dan blogged that he would rarely post this week because of our work at the MTC in Mountain View.  Boy, was he right — it has been pretty consuming.  So, I’ve been quiet too.

We’ll be heading up to the MS Research eScience event next week.  I’ll be blogging about that soon enough.  If you’ll be up there, contact me.  It’ll be a whirlwind trip for me, but it looks like there is a bit of “meeting“ time in the schedule.

Hope to see you there!

Tags:

Please update your feed!

Dan noticed that he was no longer getting posts from my blog and that he had originally subscribed to the wrong feed (i.e., the Atom feed from Blogger) instead of my Feedburner feed: this one.

Those of you who originally subscribed to the Atom feed probably won’t get this post! Otherwise, please update the feed to the following:

http://feeds.feedburner.com/MindFromRWandering

I apologize for any confusion this might have caused.

Cheers!

Microsoft done for?

Robert Scoble is spending a bit of time refuting this point. The latest post is here where he refers to responses to the current company meeting.  He is in a good position to refute these claims as he has a broad view of what products are coming at Microsoft.

I do find the premise that “Microsoft is done for” a bit naive.  I’m sure people have reason to be skeptical about recent management changes, execution of new projects, and as far as I know, concerns about company morale and cohesiveness. 

But, so many are so anxious to relate the story of Microsoft’s imminent demise that they are not seeing straight.  People keep looking for the next big thing and then making the connection that is the Microsoft killer. 

Linux was going to dethrone Windows.  Well, no.  Certainly very many machines that might be running (and licensing) Windows are running Linux; however, the growth of new machines running Windows is phenomenal.  Microsoft is winning this battle.

Now Google is going to dethrone Microsoft.  How again? 

  • With the best search engine out there?
  • With the best mapping / sattellite software?
  • A new special-purpose OS (quick, everybody: rewrite everything!  Microsoft will be buried in a year!).  (Dan has recently posted some thoughts on this)
  • With new applications for Windows?  A new Word processor?
  • In the enterprise? 

I see much more opportunity for synergy between these companies than one destroying the other (I actually have tremendous respect for Google, by the way).  I can understand why there is a battle here starting with the search engine (and going down into the OS).  Microsoft wants to be the top search engine (eyeballs equate to revenues in the search market).  But, this doesn’t equate to Google causing Microsoft’s demise.

And of course, Microsoft is not sitting still and waiting to be destroyed by anybody.  Not only are they creating new products (and product features), but they are working on a bigger more connected vision that is actually pretty cool.

I think the big problem is that the Microsoft haters will always hate Microsoft.  These people revel knowing that Google and Microsoft are at war and hope they have finally chosen the right horse. 

Anyway, I think the reports of Microsoft’s death are greatly exaggerated.  (apologies to Mark Twain).

Tags: , ,

XML Intellisense in VS2005

When I was at , I was talking to Faisal Mohamood about performing distributed builds on the Digipede Network.  I had a question about Intellisense in VS2005 and he said something like “Really?  That should just work”.

Finally I have gotten to sit down and spend a few focused minutes on this Intellisense issue.  Our XSD works great in VS2003, but not in VS2005.  Lots of warnings that look like this:

Type ‘x’ is not declared in namespace ‘y’.

I made the assumption that the VS2003 schema was actually valid; but it turns out that it wasn’t.  Strangely enough, it appears that VS2003 is much more forgiving about errors in XSD than VS2005 is.  I’m happy to say that the XML validation features of VS2005 told me what was wrong with the schema and it was easy to fix.

Note: our original schema had been created using xsd.exe from a class library.   I had to tweak some things in it by hand, but basically VS2003 accepted it as it was generated.  Oddly, it had several problems in it.  The most major one (and the cause of the problem above) is that there were many top-level element nodes that should have been complexType nodes.  It seemed kind of arbitrary whether types were defined or not.  So, don’t trust xsd.exe for creating valid XSD.

Tags: ,

Newsgator Outlook Edition trouble? Reinstall!

I have been using the Newsgator Outlook Edition for the past year and was pretty happy with it, but I just realized that it has been discarding posts somewhat arbitrarily.

For example, I had subscribed to the PDC Bloggers feed and hadn’t gotten a new post since the Wednesday of the conference.  With all of the feeds I was reading, I didn’t even notice.  Several other feeds have been behaving the same way.  Newsgator online was working fine, though.  Definitely not the feeds, just the reader.

A trip to the Newsgator support site clued me into “Shift-Refresh” as a way to force a refresh of a feed.  This didn’t work.  A service release (SR2) was released earlier in the month.  Upgrading didn’t make a difference.

Uninstalling and then re-installing did work.  Now I have (unfortunately) a whole lot of posts marked as unread.  It is a good think that Newsgator can sync your feeds from the web site.  Handy feature, really.

Tags:

Microsoft wins the PDA OS war

Business Week is reporting that soon there will be an announcement of a Windows Mobile Treo.  This was expected, but now it is (almost) official:

Microsoft has won the PDA OS wars

Being an avid user of Palm OS devices since the Pilot Professional and recently a user of the JASJAR (a Windows Mobile 5 Phone), I have to say that Microsoft won this one on marketing.

That is not to say that technically Windows Mobile isn’t impressive.  It certainly is; however, the ease of use and responsiveness of the T3 stands in stark contrast to the slowness and complexity of the JASJAR.  OK, I should try other Windows Mobile devices before I make a statement about relative speed, but the overall complexity of the PIM functionality makes Windows Mobile very hard to use. 

I just don’t see how an average (non-technical, non-geeky) user could use a Windows Mobile device as their PIM.

Update: fixed a typeo and an admission: no, Windows Mobile devices are not necessarily slow.

More from the PDC05 Day -3+

The third day of the PDC were of particular fun. It was so much fun, and it has taken me until Sunday to get around to writing about it!

Our booth was full of prospective customers, partners, and several Microsoft people.

In terms of customers, there were people from all sorts of companies both big and small. We heard from many IT people in need of improved performance and distributing existing processes. Many of the customer prospects said one of the following:
I didn’t know you could do grid computing with Windows.
Wow, you can do that with .NET (or C#, or . . . ).
We look forward to following up with these prospects and getting more satisfied customers.

We also talked to several exhibitors who could take advantage of our product to enhance the performance of their product. Look for the “Digipede Inside” logo coming soon to a product near you!

I had a good talk with Eric Lantz from the Microsoft HPC group on many things related to their coming offering and their beta that was just released. He cleared up any confusion (at least for me) about where CCE fits into the release schedule. The good news is that both CCE and CCS are scheduled for release in the first half of 2006. Kyril and Bob Muglia demonstrated CCS during the third keynote. As CCE is merely a limited version of the Windows Server 2003 64bit OS, it hardly got a mention. I think this makes sense for the PDC crowd, however, I think that the HPC customers will be quite happy with CCE for its competitive price.

I had several conversations with people in the Visual Studio and other groups. Not only did I get some technical issues resolved, but some good ideas for how to further enhance our product and its integration with different Microsoft products. And even better, now I have met many of the Program Managers that will help me if/when we have any difficulties. I will be blogging more about this as I dive into these integration points.

All in all, was a great conference for us. Sometimes when exhibiting at a conference, it can be hard to know if it will be full of actual customer prospects, or just an opportunity to interact with other potential partners. Of course, the answer to this is different for each customer. One company in a nearby booth had very little traffic. For us, though, it turned out to be the best of both worlds.

Universal Studios Party

The Universal Studios party was a lot of fun. I have not been there since the 70s. Jaws and the Six Million Dollar Man were the exciting things to see then. Now, I think the highlights are The Mummy Returns ride and the Jurassic Park ride.

They are not kidding when they say you get wet on Jurassic Park. The guys I went with weren’t too keen on getting wet, but I went straight for the front of the boat. The attendant told us the front-left was the worst on the boat. That is where I sat. I could tell what was coming because once I sat down (before the ride left) my pants were already quite wet. Anyway, it was a blast.

We brought a prospective customer with us to the party. He only recently began coding for the Microsoft OS. at one point, out of the blue, he said “Man, I have to tell you, that Visual Studio absolutely rocks!” He was talking about Visual Studio 2003.

Thanks to Microsoft for a great party and a great !

Tags: ,

PDC05 Day 2

The keynotes today at were interesting. I’m excited about the Windows Workflow Foundation. Any chance that it will be released for XP? There was a lot more on Office 12 today. The server-side stuff looks great. These kinds of tools will transform the file-server from a ubiquitous catchall of data for all users into special purpose storage for IT staff.

I spoke with Jesse Kaplan today from the CLR team. We talked about different ways to selectively launch a process using a specific runtime. He also confirmed a strategy for supporting a second level of registration-free COM. We are already doing registration-free COM, but there are some ways that I want to make it more flexible for our customers. The best thing is, that if I have any trouble getting this to work I will know who to talk to! I recently blogged about putting together an article on COM APIs for .NET Libraries. One of my motivations for doing this is to provide end-to-end steps on how to handle getting registration-free COM to work with embedded Win32 resources in a real release environment. I’ll have to get back to that soon.

My thanks to Jesse.

I appreciate the effort that Microsoft is putting into creating an open community for developers (and ISVs). Talking directly to people who have the answers certainly saves all of us a lot of time. This is a great thing about these events: for we can always locate the person we need online or through our Microsoft partner representatives, it is a whole different thing to walk into the middle of a group of 20 experts on a specific topic.

Jim Gray from Microsoft Research came by our booth today. This was my first time meeting him. Our CEO, John, has met him (and met with him) several other times. It is nice to see that he is taking an interest in what we are doing. We will be seeing him again in October up at a Microsoft gathering for academic and scientific computing.

And now, I’m looking forward to the party tonight at Universal Studios.

The LINQ Project

I forgot to mention the LINQ project yesterday.  Integrating query into the language is such an incredible productivity enhancement.  Of all of the new technologies I have seen at this PDC, this is the one that resonates the most with me as a developer.  The ability to create strongly typed data representations and queries integrated into the compiler for ensuring language semantics is huge.  I think of all the code that we have written in .NET for which we have to translate data in and out of SQL; all of the queries that we have written that cannot be effectively validated until runtime; and the numbers of places in our code where changes must be kept in sync.  With LINQ, the initial development time will be greatly reduced, but almost more important, the future maintenance cost will also greatly reduced.

I got into a discussion with Dan about the posting by Paul Mooney   about the Google/Microsoft judgment was bigger news then the Bill Gates keynote (as indicated by the relative placement of these news items in a newspaper).  This doesn’t really surprise me (everyone wants to know if Ballmer really threw that chair).  Seriously, though, I think that a lot of the technologies that are being unveiled at PDC05 fall into two camps:

1. Vista and Office 12.  I fear that the delays in Vista and perception of Office (see my earlier post) may make these stories not “sexy” to the mainstream press.

2. Really cool technology for developers.  The typical business person has heard this story a million times already.  In fact, above I post that LINQ will allow me to develop better software more quickly and that it will be easier to maintain.  That is an obvious cost benefit to companies of all kinds.  But is saving money with better tools an interesting story?  Hasn’t the press written thousands of stories just like this before?  I’m not arguing that it isn’t cool or that it isn’t revolutionary technology.  I’m just arguing that your typical reader doesn’t get it.

Tags: , ,

Windows CCS. CCE?

Windows CCS is the Compute Cluster Solution that the Microsoft HPC group is working on. This is a collection of tools and prescriptions for reservation-based clustering on the 64-bit Windows platform. Windows CCE (Compute Cluster Edition) is a version of the Windows Server 64-bit Operating System tailored to clustering.

One of my posts yesterday mentioned Windows CCE (regarding a talk at PDC05). I expected to hear about that in today’s talk by Kyril Faenov. So far, though, I have heard no mention of it. There is still time for this tomorrow (there will be a Windows CCS (or CCE?) demo on stage with Bob Muglia at tomorrow’s keynote).

Kyril’s talk on CCS today was a good primer for people unfamiliar with MPI and message passing in general. It is interesting to see how many parallels there are between the work we have done at Digipede and the work being done by Kyril’s group. This will ease the integration points between our systems.

I’ll post more on this another time – now, sleep is beckoning.

The Expo

I spent a little bit of time trolling around the Expo today at PDC05. My company, Digipede, has a booth at #123. Come by and say hello.

Check out the JetBrains booth. I didn’t get a chance to talk to them today. Apparently, they came out here all away from Czechoslovakia. My whole team uses their product Resharper. It does refactoring for C#. Refactoring is cool. But what I really like about the product is its searching capabilities. It allows you to enumerate / list exact references to classes, types, members, etc. No more “Find in Files” to try to determine how a particular item is used. I was amazed at how much this boosted my productivity. It helps in refactoring, obviously, but also in code audits (where was this defined?), debugging (where is this field being set?), and just straight coding.

MSDN Universal subscribers: don’t forget, always bring your ID card to these events. They always have something special to give out to subscribers. Or maybe it is just to Universal subscribers. Anyway, go talk to them. I got a cool rollup keyboard (that I think we’ll go nicely with my new JASJAR).

I was interviewed today by Doc Holladay at isvchalktalk.com. They told me I did a good job. But I think they get paid to tell me that. They are all really nice and I think they have the giveaways (those blinky spiky balls) that will be the biggest hit with my kids. I have rarely been interviewed in that way (i.e., in one take with no editing). I certainly enjoyed it, but went away feeling I could have been crisper. Next time!

Comments on the keynote day 1

Bill Gates gave the keynote today at PDC05. I like hearing him talk about the software industry – here’s a guy who truly loves software, calling it is the biggest agent for change in the world. Addressing the question of whether the best days of software development are behind us, he rightly says that this is one of the most exciting times in the future looks very interesting. The development of the Internet and the boom and bust cycle that we all witnessed was certainly an exciting time (mostly the boom). But the advent of truly connected devices and systems makes this an interesting time regardless of the platform on which you are developing. And the Microsoft platform is getting more interesting all the time.

I loved the Bill Gates / Napoleon Dynamite video. IMHO, the very best part is the dance bit at the end.

I was impressed with Office 12 (and I understand there’s more to come tomorrow). I did not expect to be. I suspected that the world didn’t need a new Office. For example, I think that the improvements in Office 2003, while significant, and did not make for a compelling upgrade from Office XP for a significant set of users. With Office 12, though, it is immediately apparent how they have made great strides in helping users get their work done faster. Of course, there are all sorts of other interesting features for sharing, workflow, etc. but I can see how your average user will look at Office 12 and say, “I’ve gotta have that.”

The Vista demos looked very good. I have played around with some of this already, so it didn’t feel particularly new, but it sure is cool. It will certainly do a much better job of helping users work with the data on their machines. And I don’t mean in a Google Desktop kind of way, but with an extensible file edge view should model that allows for slicing and dies in your files in arbitrary, useful ways.

Radisson / LA Metro

It turns out we aren’t in one of the conference hotels. No shuttle service for us, but it did give us the chance to ride the LA metro. Pretty much door to door from the Wilshire Radisson to PDC05. I wish we were carrying a camera, because it was kind of cool to get off of the Metro and see the south hall of the LA Convention Center with the big Microsoft PDC sign.

The other bonus of the Radisson is the free upgrade to the Ambassador suite. While we will be scrambling for the shuttle to the Universal Studios party tomorrow night, at least there is a nice room to come back to.

Sweet suite.

Tags:

Update to VPN/SSH @ PDC05

I posted that we were having trouble with our VPN and SSH clients.  I was right – in principle, there is no problem using these services at PDC05.

Unfortunately, our VPN doesn’t support NATT so we won’t be getting our email while were here.  And one of our remote SSH boxes won’t reply to us if we run SSH2, but SSH1 works OK.  Not ideal, but it will have to do.

I hope.  Otherwise we’re going to make a grid out of four laptops.  That might be cool anyway.

Thanks to Chris Craig in network support for helping us diagnose the problem.

Tags:

Ode to cool names

After my last post on some of the cool Microsoft technologies at PDC05, I started thinking about acronyms and product names, and product positioning. Specifically, I started to miss some of the old Microsoft code names.

Indigo is now WCF.
Avalon is now WPF.
Longhorn is now Vista.

It feels so generic, so corporate, and so stodgy. While never having talked to anyone in Microsoft branding / naming, it seems like this is intentional. Microsoft is making a terrific push into the breadth of the enterprise. No longer is Office the solution to every problem and C++/VB the only tool. Microsoft is serious about serving this market beyond the OS/Office and, I think, the products names reflect this.

Of course, Microsoft doesn’t have an easy job on their hands – I don’t mean to imply that they do.

But, I miss the old names. At the very least, I wish Longhorn had kept its name. Or had taken the name of Indigo. Now that is a cool name.

Tags: , , , ,

Tech @ PDC05

Microsoft is presenting on and / or announcing a lot of new technologies at PDC05 that are interesting for us:

Windows Communications Framework (was Indigo) The more integrated the communications services are with Windows and the more transports-independent they are, the better. I look forward to giving our customers more options on how our components communicate (regarding protocols, transport, and security) to best fit their specific operating environment. Of course, a lot has already been written on WCF. I look forward to hearing more about future directions.

Windows Workflow Framework and Windows Workflow Services (was Windows Orchestration Engine): while we plan the enhancements in the workflow capabilities of the Digipede Network, integrating with existing systems is always a requirement. A no-brainer for us was/is to build a BizTalk adapter. WWS looks interesting (as it looks to replace the existing BizTalk Orchestration services) – it will allow us to integrate with BizTalk 2006 as well as Office 12. This means that Microsoft has just reduced the number of integration points we need while increasing the flexibility of the entire solution. Very cool.

Windows Server Compute Cluster Edition (CCE) This product is going to make a big splash in the growing 64-bit clustering market. The work that that team is doing to improve the platform for distributed computing is all good. As Dan said in a recent post, this is a critical move. I look forward to Kyril’s talk and to catching up with him on their plans.

And more. I’ll blog on that later . . .

Tags: , , ,

Cabbing to the PDC

I am sitting in the cab on the way to the LA convention center for PDC05. Dan is there now having some issues with network connectivity from our booth (#123). SSH and VPN ports blocked? Can’t be – I’m sure he’ll figure it out.

A few weeks ago, I was at the Santa Cruz Beach Boardwalk with my family. I found out that my 4-year old has a stronger stomach than I do.

And I’ve just realized I cannot blog while in the back of an LA taxi.

Tags:

Removing a hanging assembly reference

I don’t know if many people have run into this problem: a .NET assembly referencing another assembly in its manifest, though the referenced assembly isn’t used at all.

I don’t believe this is possible under normal conditions, but it is possible with an application that post-processes the assembly. Specifically, this can happen when using Dotfuscator 3.0. When obfuscating .NET 1.1 assemblies, it supports custom obfuscation attributes defined in a .NET library that they ship. Depending on the way you configure Dotfuscator, these attributes can be stripped from your obfuscated assembly. This is reasonable as the attributes have already served their purpose. There is a confirmed bug (that I’m sure they’ll fix soon) that leaves a reference in the manifest though all the attributes have been removed.

In most cases this doesn’t effect the use of your assembly. The CLR won’t try to load the referenced assembly (as there are no actual references to any types in that assembly). The one problem that I have found, though, is if your assembly is a library that others (e.g., your customers) will reference in their own projects. The assembly still functions properly, but undesirable warnings will be emitted by the compiler. And of course, this only applies if you are not shipping the unreferenced assembly.

As an interim solution, they (i.e., Preemptive support staff) suggest disassembling to il with ildasm, manually editing the il, and then reassembling with ilasm. Of course, this approach doesn’t work in an automated release environment. Understandably, they leave that as an exercise for the reader.

Here is what we did. Since all of our release builds are done with nant,
we made use of the built-in ildasm and ilasm tasks. Then we added a custom task that removes the reference from the il. The following code shows an example target assuming that the name of the library is ‘MyLibrary.dll’:

<?xml version="1.0" ?>
<project name="Hanging reference Example" default="rebuild" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
    <target name="assembleobf">
        <!-- fix the Preemptive.ObfuscationAttributes.dll hanging reference bug -->
        <ildasm rebuild="true" output="MyLibrary.dll.il" rawexceptionhandling="true" quoteallnames="true"
            utf8="true" linenumbers="true" input="MyLibrary.dll" />
        <!-- define a task that takes an IL file as an input, removes the Preemptive.ObfuscationAttributes.dll, and
             writes the file out again -->
        <script language="C#">
            <imports>
                <import namespace="System" />
                <import namespace="System.IO" />
                <import namespace="System.Text" />
            </imports>
            <code>
            <![CDATA[
                [TaskName("removeRef")]
                public class RemoveRefTask : Task {
                    private string _obfuscatedLibrary;
                    [TaskAttribute("obfuscatedLibrary", Required=true)]
                    public string SomeProperty {
                        get { return _obfuscatedLibrary; }
                        set { _obfuscatedLibrary = value; }
                    }

                    protected override void ExecuteTask() {
                        StreamReader inFile = new StreamReader(_obfuscatedLibrary + “.il”);
                        string inContents = inFile.ReadToEnd();
                        inFile.Close();

                        StringBuilder sb = new StringBuilder(inContents.Length);
                        StringReader stringReader = new StringReader(inContents);
                        string line;
                        while ((line = stringReader.ReadLine()) != null) {
                            if (line != @”.assembly extern ‘PreEmptive.ObfuscationAttributes’”) {
                                sb.Append(line + ‘
‘);
                            } else {
                                for (int i=0; i < 4; i++) {
                                    stringReader.ReadLine();
                                }
                                sb.Append(stringReader.ReadToEnd());
                            }
                        }

                        StreamWriter outFile = new StreamWriter(_obfuscatedLibrary + “.il”);
                        outFile.Write(sb.ToString());
                        outFile.Close();
                    }
                }
            ]]>
            </code>
        </script>
        <removeRef obfuscatedLibrary=”MyLibrary.dll” />
        <ilasm rebuild=”true” output=”MyLibrary.dll” resourcefile=”MyLibrary.dll.res” target=”dll”>
            <sources>
                <include name=”MyLibrary.dll.il”></include>
            </sources>
        </ilasm>
    </target>
</project>

They’ll fix it soon, I’m sure — but for now this will work just fine.

Tags: , ,

eWeek writes about the Digipede Framework SDK

Darryl Taft at eWeek posted an article yesterday on one of the things we’ll be showing next week at :

Digipede to Release SDK for Windows Grids

Have I said that I’m looking forward to the PDC?

Tags: , ,

Run Plazes while at PDC05

I have been checking out Plazes. If you haven’t tried it out yet, it is a way to share your location with others where location is defined by the network you are running on.

Kind of cool, but not too useful when sitting at home or in the office. I’m looking forward to trying it out at to see how many people (and geeks like me) come up on the Plazes radar.

Maybe I’ll “see” you there.

Scoble says we’ll be amazed at PDC

Today on channel 9, Robert Scoble asked for guesses about what will be announced at PDC next week (because no one seems to have a clue). Then he blogs that will prove that Microsoft is definitely not “roadkill.”

I certainly didn’t think Microsoft is roadkill — but I’m glad I’ll be there to find out first-hand.

See Ye old “guess what MSFT is gonna show at the PDC
and Steve says Microsoft is roadkill (and a few other things), respectively.

COM APIs for .NET Libraries

Recently I added a COM API to the Digipede Framework API – developing a good, maintainable COM API was critical. The “easy” Microsoft .NET COM interop works pretty well, but it defaults too many things for those of us building public libraries.

If your public library needs to support COM, there are several steps you will want to take to make your COM API easier to maintain and to allow your library to behave (or appear) as COM clients expect.

I am thinking of writing an article (or a series of blog entries) on the steps I took designing our COM API. While some material exists out there on this (most of it pure reference), none of it brings it all together, soup to nuts.

My quick outline for the article:

  1. Introduction
  2. Limitations of COM interfaces
  3. Overriding the class interface
  4. Eventing interfaces
  5. Building your Type Library
  6. Embedding your Type Library
  7. Enabling Registration-Free COM
  8. Building a COM API Reference w/NDoc

Every section will include examples.

I guess my only question is: do I blog it or write an article for one of the many .NET related sites? If I write an article, which site should I submit it to?

Tags: ,

Designing .NET Class Libraries

I was talking to a friend of mine the other day about Microsoft and why I choose to develop software for their OS versus some other platform. I won’t post all of that discussion here, but one point I made to him was that Microsoft provides excellent resources to their developer community.

I don’t think I really need to further make that point here (anyone interested in reading my blog probably buys into this view already); however, it did remind me of a series on API design that I downloaded from MSDN earlier in the year. Designing .NET Class Libraries provides good information for all .NET developers, regardless of whether you are designing public libraries or not.

Designing .NET Class Libraries

It is worth the time investment.

Going to PDC05

My company, Digipede Technologies, will be promoting our new SDK at PDC05 next week. At the same time we will be announcing and giving away free licenses to the Digipede Network Developer Edition.

I am looking forward to the trip. In my past companies, the clientele was often not technical outside of their particular vertical experience. As software developers are one of the primary targets for the Digipede Network, I’m happy that our customers and prospective customers are highly technical. This makes the customer meetings much more interesting for me and productive on many different levels.

Basically: We’ll get to talk to lots of smart people about what we are doing. And that is always fun.

Tags: , ,

What is R Wandering?

This blog will track my thoughts on software, process, tools, and technologies. I will also use it as a place to post approaches and solutions to technical problems I come across. I have a bit of a backlog of these that I plan to write up over the next month (e.g., some nant and ccnet stuff, developing COM interfaces and documentation for .NET, some Preemptive posts . . . ).

I have been developing software since high school and basically full time since I was a Junior at Cal. I finished there 15 years ago and have since helped build a couple of companies as the software technology lead. While my primary responsibility is generally planning, designing, and building software product I have also been responsible for or directly involved in every aspect of the business. I’ve been on company boards, managed human resources, hired and fired, performed technical selling and evangelism, worked through various due-diligence processes, sold a company, and more. Aside from developing software, one of my favorite things to do is to discuss business issues with fellow entrepreneurs.

My company, Digipede Technologies (www.digipede.net), sells the Digipede Network, a Windows-based distributed computing product built upon Microsoft .NET.

I became interested in distributed computing while at Energy Interactive (www.energyinteractive.com). Among other products we had an energy billing solution designed for billing the most complex commercial and industrial customer for energy providers. Billing was a long running process and we needed to come up with a way to shorten the total run time for a billing cycle. When scaling up was no longer an option, we did the next logical thing: we scaled out. To do this, we ended up rolling our own solution using DCOM, but, we felt that there had to be a better way. That is one of the motivations for the Digipede Network –a packaged solution with the tools to make it easy to grid-enable applications.

In terms of development technologies, I’ve spent most of my time working with Microsoft tools and technologies. I first started with Windows 2.0 and have, of course, worked on all of the Microsoft platforms since. I have worked with C++, VB, MFC, COM/DCOM, ATL, everything from ODBC to ADO.NET, Java, MSMQ, SQL Server, C#, ASP.NET, and more. Now, I am fully a .NET and WinFx developer.

In addition to my work I also manage a couple of FreeBSD servers for hosting email and Web sites.

 

 

And none of that explicitly defines R Wandering.