November 2011 Entries

Signing EXEs and MSIs with Signtool via TFS Builds

I won't repeat the "Signing your code with Signtool" walkthrough that is already detailed in 50,000 other posts. You can Bing that with Google as easily as I did. What I will share is a little issue that tripped me up for a bit. I wanted the code signed as part of the TFS automated build. And, while I could run the command line myself, I could not get it to work under TFS builds. The Scenario I wanted the keys in the certificate store, rather than on disk. This makes it possible...

posted @ Friday, November 18, 2011 3:23 PM | Feedback (2)

LINQ to Excel = Bliss!

It's fun when an API is so awesome that it just makes you smile uncontrollably. That's how I felt after using Linq To Excel! http://code.google.com/p/linqtoexcel/ I dreaded the thought of coding against Excel and decided to search around for the best approach. StackOverflow served up a couple options, including LINQ to Excel. Now I like LINQ, so it naturally attracted my eye. The project is completely awesome! It let me extract data from multiple sheets in an excel workbook with just a few lines of code, and no direct dependency on Excel to be installed on the machine!...

posted @ Tuesday, November 08, 2011 11:28 PM | Feedback (0)

Poor-man's .NET Linker = Embed Your Dlls

I had a need to create a simple .NET app, but it needed to be self contained in a single EXE. Native developers (C / C++) can easily create single EXE programs by utilizing the linker to pull the various pieces into the EXE. Not so easy for .NET. I remembered reading about options for this in the past, and decided to take the quick & easy route. Options that I've heard of include: Use the Mono tooling to "link" the dlls into the exe Hook "type-resolution" events and locate the...

posted @ Thursday, November 03, 2011 3:17 PM | Feedback (0)

Don't Reuse Context with Entity Framework Self Tracking Entities

With EF Self Tracking Entities, it appears that using a single context for a "read" and then a subsequent "save" does not work. I guess I could let this one go as "By Design", but that doesn't mean I have to like it… The Scenario: EF Self Tracking Entities for an MVC 3 site I have an MVC3 site wherein I'm using Self Tracking Entities. These are exposed by repositories that I'm injecting into the controllers via Ninject. Since we're letting our IoC container create these items, the lifetime of the instances are "per request". Inside the...

posted @ Tuesday, November 01, 2011 1:27 PM | Feedback (1)