Windows Fabulous is released today!

October 22, 2009 by robindotnet

Back in August, Windows 7 (which I refer to as Windows Fabulous) came out on MSDN for BizSpark customers. Since I’m head of engineering at our company, I figured I should download it and install it, to, um, evaluate it. Yeah, that’s the ticket. I should try it out and make sure our product would work on it, yeah, and make sure everything would be fine. Absolutely. I didn’t install it just because I thought it would be really cool. No, sirree. (Okay, maybe a little.) (Okay, okay, maybe more than a little. I’m a geek; what do you want?)

Since I work on my computers, I bought new hard drives for both of them, just in case I had any problems and needed to revert. (A little paranoia never hurts. Plus, hard drives are cheap.) For my laptop, I bought the awesome Seagate Momentus 7200.4 drive, a 500GB 7200RPM SATA drive. In fact, I bought a second one and an enclosure, and made my own pocket drive too. (Every single packaged pocket drive on the market is 5400 rpm. As Nero Wolfe would say, “Pfui.”)

Then I installed Windows Fabulous, plus all of the rest of my software (more on that later). (Thank God I keep a list, complete with serial numbers). It took about 20 minutes to install Windows Fabulous, and 2 days to install everything else.

So I’ve been running Windows 7 for about two months now (since it came out on MSDN for BizSpark customers, of which my company is one), and I have to say, it’s the best thing since sliced pickle chips. There are plenty of articles showing what people like about it, and I’d have to say my favorite feature is the glass.

Let’s say you have 4 Visual Studio instances open. If you hover over Visual studio in the task bar, it shows thumbnails of the instances. If you hover over one of the thumbnails, it turns everything else to glass, and shows that one window on the screen. If you click on the thumbnail, it makes that window active and brings it up in front, without closing the rest of the windows.

This has made it a lot easier than Alt-Tab ever did to find the window I’m looking at. This also means I can hover over the Outlook icon in my taskbar and see if I have any new e-mail I need to address, and if not, just go back to what I was doing, without ever changing focus to Outlook. As someone who always has a lot of instances of VS and IE open, among other things, it’s hugely helpful.

I’m finding the jumplists helpful too, but I had to figure out how to re-enable the Recents folder on the start menu. Jumplists are great, but if I open a PPT file, and only open it once, it doesn’t show up in the frequently-used programs list and show a jumplist.

If you don’t have Windows 7, run out and get it. You’ll love it. I’ll blog about installing development software and order of precedence next. And then I’ll talk about incompatible software that doesn’t support Windows 7, and how NOT to treat your customers.

SVCC done, on to Fresno

October 4, 2009 by robindotnet

The talk at the Silicon Valley Code Camp went great yesterday. Only a few people showed up, but they were people who really wanted more information about ClickOnce. I had spent a lot of time creating samples for deploying data, and completing an article for Microsoft about certificates expiring along with the code samples for that in both C# and VB, and they chose certificates (we only had an hour).

We talked about bugs features in various areas of ClickOnce, and then talked about “The Certificate Problem”. They found the trick of clicking the OK button on the uninstall very clever, but I must profess it was not my idea nor my code. I did place a reference to the original author in the code, because I always believe in giving credit where credit is due.

I’m going to give the whole talk at the East Bay .NET User Group meeting on October 14th, so if you want to know more, and you live in the San Francisco Bay Area, come check it out!

I ran into Gustavo Cavalcanti who runs the Central .NET Users Group in Fresno at SVCC, and I had to admit I had not written all of the content for my talk out there yet (it’s in 4 days). He wasn’t concerned; he said I was fairly entertaining the last time I went out there, so he figured it would be fine whatever I wanted to talk about. :-)

In Fresno, I’ll be talking about using Visual Studio Tools for Office. I wanted to mess around with Outlook Add-Ins, and we write what we’re most interested in, so I wrote one that let me send images with a hyperlink for a GoldMail embedded in the image. This was on my own time, and it kind of got out of hand, as these things do when developers write code for themselves, and turned out to be pretty full-featured.

I added a group to the Ribbon, and added controls to it, then added a new command bar to the main Outlook window, messing around with dropdown menus and buttons and links. I tossed in a configuration form and then discovered a way to render html e-mail in Outlook if you’re sneaky (which I am). GoldMail liked my add-in so much, they asked and I consented to release it as a full-blown feature (coming soon!). So this is what I will start my demo in Fresno with.

For the rest of the talk, I’m going to draw inspiration (thinly disguised as code samples) from the excellent new VSTO book by Eric Carter and Eric Lippert, Visual Studio Tools for Office 2007. I haven’t decided what’s most interesting, but like the looks of databinding Excel to a SQLServer database, Smart Tags, Outlook Form Regions, and Application-level add-ins. I’ll figure it out today.

If you’re interested in VSTO, and Fresno is too far, come see me talk about it at the San Francisco .NET Users Group meeting on November 18th. VSTO is pretty cool.

Early morning surprises

October 1, 2009 by robindotnet
I woke up earlier than intended this morning, and before going back to sleep pulled my iPhone out of the drawer and checked my e-mail. I know this sounds compulsive, but I frequently work until 2 a.m. or later, so I generally sleep a little later. Many in the company start work before I do (okay, most in the company start work before I do), so I check to make sure there is no emergency that requires me to get up “early”. Ok, yes, this is compulsive, but I can’t help myself.

I saw an e-mail from the MVP Lead who had requested information from me when I was nominated earlier this year by my friend Beth Massi. Beth had told me she thought the awards were handed out in January, so I just figured the MVP Lead was asking for more information. I squinted and tried to read the e-mail (have you ever tried to read e-mail on an iPhone? It’s really tiny, and I wasn’t cognizant enough to do the un-pinch-y-finger-move to make it bigger). I thought the e-mail said I had been awarded an MVP award.

I figured I was delusional, being a little sleep-deprived this week preparing for my talks and still trying to work my usual number of hours, so I put on my glasses and tried again, and it still said I had been awarded an MVP award. So I took the glasses off, cleaned them on my shirt, put them back on, and it still said I had been awarded an MVP award. So I called Beth.

Having been awake for about 60 seconds, I wasn’t terribly coherent, but Beth finally figured out what I was trying to tell her. She was very happy for me. After that e-mail, how could I possibly go back to sleep?

This was a surprise to me. I knew I had been nominated, but wasn’t sure it would happen because my expertise is in such a niche area (ClickOnce Deployment, in case you didn’t get that from the Blog title), and I wasn’t sure I was worthy. And apparently I was wrong about January.

I feel very honored and am grateful to my friend Beth Massi for nominating me. In fact, she blogged about me today, and it made me feel a little teary-eyed. It’s really nice to be appreciated.

I’ve made a GoldMail explaining why I got an MVP Award, and explaining the benefits and fun I’m going to have, including next year’s MVP Summit (Geekfest!!). I will continue blogging about ClickOnce (new features in 4.0 coming soon!!) and evangelizing and answering questions in the MSDN Forums. Hope you enjoy the GoldMail!

View in browser

October Appearances

September 30, 2009 by robindotnet

You can meet me at one of these events (oooooh, aaaaah):
10/2/2009 Silicon Valley Code Camp
10/8/2009 Central California .NET User Group
10/14/2009 East Bay .NET User Group
11/18/2009 San Francisco .NET User Group

I’m going to be speaking this weekend (October 2nd) at the Silicon Valley Code Camp. My session is at 11:00 a.m. and is on the difficulties of ClickOnce Deployment, and some of the bugs I have uncovered and how to deal with them. I have several topics for discussion, but will try to address questions that people bring, and then discuss whichever topics they are most interested in.

The questions that seem to be asked the most in the forums are about desktop shortcuts and deploying data or just including extra files. Deploying data is a big one, and I have done a bunch of tests to see exactly how to deploy a SQLCE or SQLExpress database with your ClickOnce application. I will be blogging that some time in the not-too-distant future.

If you miss the SVCC event, and/or want more detail, come to the East Bay .NET User Group meeting on October 14th at University of Phoenix in Livermore. It’s right on the west edge of Livermore, barely out of Pleasanton. I will be covering the data deployment and certificate issues and basically the same topics as CodeCamp, but in more detail.

If you are interested in VSTO development, I will be giving a talk at the Central California .NET User Group meeting on October 8th. That one will cover how to create an Outlook Add-In, including modifying the ribbon, and I’m thinking data binding in Excel and maybe Forms in Outlook. I will also discuss ClickOnce deployment of a VSTO application and the bug I discovered therein.

If that interests you but Fresno is too far away, I will be giving the same talk in San Francisco on November 18th.

I also have an update to the “expiring certificate problem”, and I will be adding the new content here and linking the previous entry to the new one. I have also translated the code into VB.Net for those of you who are VB developers. (Unlike many C# developers, I don’t feel there is a whole lot of difference between the two languages, and do not discriminate based on your language of choice.) I just need to pass it by someone at Microsoft to make sure it’s completely accurate and then I will post it.

Installing a ClickOnce Application for all users

September 7, 2009 by robindotnet

I gave a talk in Mountain View at the South Bay .Net User Group meeting on August 5th. This was a general talk about ClickOnce Deployment and how to use it. Almost everyone in the room was a Windows Forms or WPF developer, which seems rarer and rarer these days as people migrate to web applications. There were a lot of questions, and a lot of good discussion about things that people would like changed in ClickOnce deployment.

The most frequently requested feature in that meeting and in the MSDN ClickOnce Forum is to install a ClickOnce application for all users rather than a specific user.

This is difficult because the files are stored in the user’s profile, where the user has read/write privileges. One of the design goals of ClickOnce is to provide a deployment technique that allows customers to install applications without elevated privileges. Installing an application for all users requires privileges.

Another design goal was to protect the client machine from problems caused by software installations. Do you remember “dll hell”? This was the problem that happened when another application came along and replaced a dll that you were dependent on, and caused problems for your application, or vice versa.

In a ClickOnce deployment, it is possible to include most of the dll’s locally with the deployment, rather than installing them in the GAC or the windows system directory. (This is excluding, of course, the .NET Framework and other prerequisite applications such as SQLServer Express.) You can even deploy the SQL Compact Edition dll’s or DirectX dll’s. This allows you to maintain strict version control on the dll’s that you include in your deployment. Microsoft would have to figure out a way to handle this if the application were deployed for all users; if they weren’t careful, you could easily end up in dll hell again.

On the other hand, if they just chose to put the files under the All Users profile, once again you have the permissions problem that Microsoft sought to handle with ClickOnce deployment, because the user can’t write to those files without elevated privileges. Also, If Microsoft stored the deployed files in the “All Users” folder, they would have to figure out what to do if UserA was logged on using the application, and then UserB logged on and there was an update available. Do you kick off UserA? Do you forego the update because UserA is already running the application? What is UserA always leaves his account logged on? How will you ever do an update?

This request has been passed on to Microsoft, but I haven’t heard of any plans to include a change to this in .NET 4.0, so I wouldn’t expect any quick results. Doing an all-users install is counter to the design goals of ClickOnce deployment, so I think it’s going to be something everyone has to live with, at least for now. Using XCopy or a setup & deployment package and rolling your own incremental update methodology would be the way to go if you absolutely have to have an All Users installation.

Where do I put my data to keep it safe from ClickOnce updates?

August 19, 2009 by robindotnet

Sometimes you want to include a file with your ClickOnce application and then update it using input from your customer. Or about your customer. Or about what your customer is doing with your application. (“You say you didn’t hit the delete button, but according to the log file, you hit it exactly 47 minutes ago.”)

To include the file in your deployment, add it to your project, and set the properties correctly. “Build Action” should be set to “Content”, and “Copy to Output Directory” to “Copy Always”.

When you deploy a file with a ClickOnce application, it is kept with the installed files. When you deploy a new version of the same application, it creates a new folder for the new version, and installs the files there, and you lose access to the original file, which defeats the whole purpose of saving the user’s changes to it. So if you don’t want to lose the file when there is an update, you need to move it out of the deployment folder.

If you are running Windows Vista or Windows 7, there are very few places to which you can write data on the user’s computer (Cancel or Allow?). You could put it in MyDocuments, but the user is likely to stumble over it and hurt his toe and sue you, or he may delete it because he doesn’t know what it is. So to store data used by your application, the recommended location is Local Application Data.

Create a folder in LocalApplicationData using your company name or product name. You could use another company’s name (like, say, ‘Microsoft’), but this might lead to unpleasant surprises down the road. You could also call it George, but you’ll forget that and then spend an hour looking through all the folders trying to find your file.

The first time the user runs the application, you want to create your folder and copy the file over there. When the user runs it the next time, you don’t want to copy the file over there. If you did that, it would be exactly what ClickOnce does, and would defeat the purpose of this entire blog post.

So the most effective thing to do is check for the directory. If it’s not there, create it. Then check for the file in the directory, and if the file’s not there, copy it over. You could assume if the directory is there, the file will be, but if your application mysteriously crashes (like the user’s laptop gets run over by a truck at that exact moment of execution), then the file could be missing. It only costs you one line of code to protect yourself from an embarrassing execution error.

I’ve tried to make this narrow enough to actually fit in my blog. Ordinarily, I wouldn’t use all the extra variables. I’m posting this in both C# and VB because I’m a C# developer trapped in a VB developer’s body.

Here’s the code in C#:

string localAppData =
  Environment.GetFolderPath(
  Environment.SpecialFolder.LocalApplicationData);
string userFilePath
  = Path.Combine(localAppData, "MyCompany");

if (!Directory.Exists(userFilePath))
    Directory.CreateDirectory(userFilePath);

//if it's not already there, 
//copy the file from the deployment location to the folder
string sourceFilePath = Path.Combine(
  System.Windows.Forms.Application.StartupPath, "MyFile.txt");
string destFilePath = Path.Combine(userFilePath, "MyFile.txt");
if (!File.Exists(destFilePath))
    File.Copy(sourceFilePath, destFilePath);

Here’s the code in VB:

Dim localAppData as String = _
  Environment.GetFolderPath( _
  Environment.SpecialFolder.LocalApplicationData)
Dim userFilePath as String = _
  Path.Combine(localAppData, "MyCompany")

If (!Directory.Exists(userFilePath)) Then
    Directory.CreateDirectory(userFilePath)
End If

'if it's not already there, 
'copy the file from the deployment location to the folder
Dim sourceFilePath as String = Path.Combine( _
  System.Windows.Forms.Application.StartupPath, "MyFile.txt")
Dim destFilePath as String = _
  Path.Combine(userFilePath, "MyFile.txt")
If (!File.Exists(destFilePath)) Then
    File.Copy(sourceFilePath, destFilePath)
End If

One thing to note is that when the user uninstalls the application, the data will not be removed, it will remain there forever, or until the user’s laptop gets run over by a truck, and then technically it’s still there even though he may no longer be able to access it. If the user donates his laptop to one of those electronics recycling centers, and instead of wiping the hard drive like they claim, they actually look at the files on it, they will see your file. (You might not want to store the user’s social security number in the file w/o encrypting it.)

On the other hand, if the user ends up having to uninstall and reinstall the application because you accidentally changed the target CPU setting in the deployment properties and didn’t realize it would change the deployment identity and everybody in the company plus a bunch of customers would call you and ask why their upgrade didn’t work (don’t ask), his cached data is still available (small comfort, but better than nothing).

You could actually use this method to handle deploying a SQLServer Compact Edition database or an Access database. Or you could copy Hamlet over to the folder and have the computer read it aloud to your customer. (Everything I learned about Hamlet, I learned from that episode of Gilligan’s Island where they did Hamlet to the music from Bizet’s Carmen. “Neither a borrower not a lender be…” “I ask to be, or not to be, and that is the question that I ask of thee…”)

Chocolate Oatmeal No-Bake Cookies

August 2, 2009 by robindotnet

I offered to share my recipe for Chocolate Oatmeal No_Bake Cookies with someone I met on Twitter (Jennifer Fong, a great resource for Direct Sales & Social Media), who also has a WordPress blog with some of her own recipes on it. I thought I would just post it here on my blog, because others may enjoy it too.

For you tech people reading this, these cookies work no matter what browser you use, whether it’s IE, Firefox, Safari, or Opera, which I’m sure will be a relief. Also, there’s none of that pesky caching problem.

Granted, this has nothing to do with ClickOnce deployment, so in order to justify putting it here on my ClickOnce blog, I will say that this is something you can do while installing the .Net 3.5 Framework (with or without SP-1) … and still have time left over to do unit testing on the resulting product.

Of course, it takes longer to install the .Net 3.5 Framework (with or without SP-1) than it takes to build all of the backend products for GoldMail, listen to half of a DotNetRocks! podcast, or read 1/4 of my favorite Data Binding book . But none of those activities yield a plate of cookies.

Now, for all you tech people checking this out, I will point out that even YOU can make this recipe. It’s mostly just adding a bunch of stuff to a pot, stirring it and letting it boil while you count slowly to 60 (or the amount of time it takes to write a complicated linq statement), then glopping it out on wax paper (which you can buy at the grocery store, where they Saran Wrap is. You remember Saran Wrap — it’s what you wrap your extra bare hard drives in, to keep the connectors clean).

The hard part is waiting a few minutes for the cookies to set before you start eating. That’s easier to do if you spend that time cleaning out the pan with your finger, if you know what I mean. You should do that anyway, because it makes it easier to actually wash the pan.

Here’s the recipe in C#. If you need it in VB, post a comment and I will translate. Just instantiate the class, and you’ll have cookies…

/// This creates cookies.
/// It is assumed that there is another process
/// throwing events from the saucepan
/// which result in the state changing.
public class ChocolateOatmealNoBakeCookies
{
    internal class Ingredients
    {
        internal int Two_Cups_Sugar {get; set;}
        internal int Half_Cup_Cocoa { get; set; }
        internal int Half_Cup_Milk { get; set; }
        internal int Half_Cup_Butter { get; set; }
        internal int Half_Cup_Peanut_Butter { get; set; }
        internal int Teaspoon_Vanilla { get; set; }
        internal int Three_Cups_Oatmeal { get; set; }
    };

    Ingredients input;

    public ChocolateOatmealNoBakeCookies()
    {
        input = new Ingredients();
        MakeCookies();
    }

    private void MakeCookies()
    {
        int three_qt_saucepan = input.Two_Cups_Sugar
          + input.Half_Cup_Cocoa
          + input.Half_Cup_Milk + input.Half_Cup_Butter;
        string heat_level = “medium”;
        string state = “cold”;
        while (heat_level == “medium”)
        {
            do
                stir();
            while (state != “boiling”);
            heat_level = “off”;
        }
        three_qt_saucepan += input.Half_Cup_Peanut_Butter;
        while (state != “melted”)
            stir();
        three_qt_saucepan += input.Teaspoon_Vanilla;
        stir();
        three_qt_saucepan += input.Three_Cups_Oatmeal;
        while (state != “mixed”)
            stir();

        int spoonful_of_stuff = 1;
        int waxpaper = 0;
        while (state != “empty”)
        {
            three_qt_saucepan -= spoonful_of_stuff;
            waxpaper += spoonful_of_stuff;
            if (three_qt_saucepan == 0)
                state = “empty”;
        }
    }
    private void stir()
    {
        //stir the stuff in the pot
    }
}

Here’s the recipe for those who don’t speak C# or .Net. Not that there’s anything wrong with that.

Chocolate Oatmeal No-Bake Cookies
2 cups sugar
1/2 cup cocoa
1/2 cup milk
1/2 cup butter
1/2 cup peanut butter (chunky or smooth, your choice)
1 teaspoon vanilla
3 cups oatmeal (old fashioned oats — the kind that takes 5 minutes to cook, not the instant kind)

  • Combine the sugar, cocoa, milk, and butter in a 3-quart saucepan.
  • Cook on medium while stirring, until it starts to seriously boil. Boil for one to one-and-a-half minutes. (Use a timer, seriously. Use the clock on your computer if you have to, or the stopwatch on your iPhone in the World Clock app).
  • Remove from heat. At this point, it’s going to start to set, so act fairly quickly or you will end up with 1 chocolate oatmeal no-bake cookie in a pot.
  • Add the peanut butter; stir until melted.
  • Add the vanilla, stir it in, then add the oatmeal.
  • Stir until mixed, then drop it on waxed paper with a spoon in whatever size you want. (I drop about 1/2 tablespoon at a time).
  • Let them set.
  • Eat them.

Servings: 1. Total number of calories: 4,250.

You don’t have to store them in the fridge, although I do, because I like them cold. And I’ve never had a problem with them going bad. That doesn’t mean they will last forever, it just means I’ve never had any last long enough to find out how long they last. I hope you enjoy them!

Local Deployment of a ClickOnce application

July 20, 2009 by robindotnet
You can deploy a ClickOnce application to localhost, i.e. your local web server on your own machine. After deploying your application to your local web server, you can install the application on your machine, on another machine in your local network, or in a VM. This is a great way to make sure all of the files required to run your application are included and/or the prerequisites work correctly.

It can take me several minutes to deploy the GoldMail Composer application to our development web server that provides access from the internet, but deploying it locally only takes a few seconds, so this method saves me a lot of time when I’m repeatedly testing a deployment.

You need to have IIS installed and you need to know the name of your Computer. This GoldMail gives a general idea on how to accomplish those two tasks, and then shows how to set your options to deploy your ClickOnce application locally and test it.



View in browser

ClickOnce Desktop Shortcut using VB

July 19, 2009 by robindotnet
This is a follow-up post to the article How to Create a Desktop Shortcut for a ClickOnce Application, providing the VB version of the code, as requested by one of the readers of this blog.

The implementation is slightly different in VB than it is in C#. In C#, you just add the code to the Program.cs and run it prior to the first form being displayed.

In VB, the best place to call this is in the Application Startup event. This GoldMail will show you exactly how to do that.


View in browser

This download contains the sample code in VB (VS2008) as well as a Word document with the same information as the GoldMail.
ClickOnce_DesktopShortcut_VB.zip

Incommunicado

July 9, 2009 by robindotnet

I’ve joined twitter with the username RobinDotNet. If you want to chat me up, you can join twitter and ping me!

I’ve been a bit incommunicado for a while, because I’ve been back to working major hours. I’m still answering questions in the MSDN ClickOnce and Setup & Deployment forums, though. It’s important to me to keep up with that, because very few people other than MSFT answer ClickOnce questions there, and I seem to be able to help people. When I’ve needed help, people in the C# and WinForms forums, etc., have helped me, so it’s my way of giving back to the community.

Why have I been working so much? I’m working on streamlining and standardizing the software in the backend at GoldMail. You know how you take over a job from someone, inherit a bunch of code, get no turnover, and have to figure it out? Welcome to my world. But I always love a challenge. The problem was that a lot of this code was the kind of thing that you write when you’re in a hurry and you’re just trying to get it to work, and you never have time to go back and clean it up. You know what I mean; we’ve all done it. (Actually, I’ve never done it, I just work more hours. ;-) ) The code worked, but it wasn’t optimal, and some was overcomplicated. Plus, some of it was still in .Net 1.1.

Also, someone had taken all of the private webservices and tucked them into one Visual Studio solution, and same for the public webservices. The problem with that is if you want to branch one of the private webservices for version 1.1 and another for 1.1 later, it makes it very difficult.

I split out all of the webservice projects into separate solutions and rebuilt all of the web references and made sure everything targeted .Net 2.0. So now we can build and deploy them separately. This makes it really clear what is being released in each GoldMail Release.

The next thing was our conversion service, which takes the GoldMail assets that are uploaded by our desktop product (the Composer) and turns them into a playable GoldMail. This is a Windows Service, and we had not modified it in well over a year. The one that we have in production works, but once in a great while it has a problem unzipping the files.

The first step for this was to get it to build as a .Net 2.0 project, and figure out how to deploy it. It had a lot of moving parts, and was extremely complicated.

After I finished, we built everything and put it on staging and gave it a good drubbing, and then moved it to production. This gave us a baseline to work with. I was very excited about this, because it was a huge release, and nobody noticed it. This means that it worked.

Our next release, currently scheduled for the end of this month, is what we call our “Facebook release”. I don’t want to give specifics, but I will say we’ve made things more elegant for our customers who post GoldMails on Facebook. This release required updates to the conversion service. Did I mention the code was incredibly overcomplicated? Updating it seemed like adding more gargoyles to the Notre Dame Cathedral, so I decided to rewrite it.

It took me 2 days. I removed all of the unneeded code (someone was planning for expansion that never happened), and added a substantial amount of logging, including showing the GoldMail ID in each logged entry so you can easily track the progress of a GoldMail conversion. I added the features we needed for Facebook, added double-checking on the files after they were unzipped, and addressed a couple of other bugs as well. And I added a whole lot of comments. (Someone I used to work with would sneer and say, “She puts comments in the code”, as if that’s a bad thing.)

I think the “files missing after unzip” problem was caused because the old program unzipped the files, then set the zip archive to null and called the Garbage Collector. I think it basically removed it before the files were flushed to disk. The only time you really should ever need to call the Garbage Collector is if you are using something that is unmanaged, like GDI+ or audio or something like that.

I reduced the code base from over 5,000 lines of code to about 600. From 20+ classes to 3. Yes, you read that right. AND I added logging and comments. I reduced the complexity of the build and reworked the process to remove a CLR trigger from our database.

CLR triggers are very cool, but that’s not a good reason to use them. This is a trigger you can write in C# or VB and have SQLServer run; they are not performant, and you should pretty much only use them if they are your only choice. I removed this trigger and backed the business logic up into the prior step.

The conversion service rewrite, along with all of the other backend changes we needed for the Facebook release, have kept me very busy. After working 18 hours on Monday and 12 on Tuesday, I’m happy to report all of the backend and client application work items have been completed, and we deployed it all to staging for QA to test today (Wednesday). It is currently scheduled to be released some time before the end of July.

So what comes next? I’m going to structure the backend to handle what I call “Replace-A-GoldMail”, and then wait for the Product Manager to figure out how best to take advantage of it. I think it would be awesome if you could replace the content of a GoldMail and not have to change the URL. For example, you could do monthly status GoldMails and embed it, and it would play the newest one.

Things are calmer at work now that I have a baseline on the backend that is pretty clean, and I’ll be able to stop working weekends again (I’m making no promises about the length of my days though!) I have some great ideas for articles for my blog.

How to deploy a SQLServer (Express or CE) database, and handle updates? How to add files to your deployment? How to deploy 3rd party dll’s without pushing them as prerequisites? How to deploy SQLCE without pushing it as a prerequisite? How to deploy to localhost to test your deployment? These are questions I see over and over again in the MSDN ClickOnce forum.

Other ideas: How to create an Outlook 2007 Add-In that customizes the Office Ribbon and deploy it using ClickOnce? (I wrote one for GoldMail on my own time, just for fun — it’s very cute.) How to write a windows service and have it run multiple tasks simultaneously and asynchronously using a thread pool and callbacks? How to install the same windows service? How to add and remove items from an MSMQ? How to run an MSMQ on your own machine?

I also have an idea about writing a PowerPoint Add-In for GoldMail. My friend Beth Massi, who works at MSFT, grins every time I mention that. Apparently PowerPoint is the least-documented object model in Microsoft Office. Heck, why start with something easy?

(Note: If you’re working on VSTO applications, check out the new VSTO book by Eric Carter and Eric Lippert. It’s awesome, and covers a LOT of information.)

So that’s what’s coming up. I’m looking forward to it, and hope you are too.