Archives

Archives / 2010 / February
  • SQLite Error IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.

    I just ran into a problem with SQLite and NHibernate, which was giving me this error message: The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. The strange thing was, it worked fine from within Visual Studio, but it died when I used my ClickToBuild.bat file, which calls msbuild and runs my tests from the command line.  A bit of searching led me to a similar problem on StackOverflow, which produced the answer: Use the x64 binaries. I downloaded the latest version of SQLite (SQLite-1.0.65.0-binaries.zip) and made sure to use the .dll in the x64 folder, and the problem disappeared.  It’s worth noting that I’m running on … more

  • Untrusted Projects and Blocked Files in Visual Studio

    I was just trying to open a project I was emailed as a zip file from a colleague.  VS2010 opens up saying: You should only open projects from a trustworthy source. The project file 'project' may have come from a location that isn’t fully trusted. It could represent a security risk by executing customer build steps when opened in Microsoft Visual Studio that could cause damage to your computer or compromise your private information. Which is fine… but in this case I know the project is OK so I click the box and tell it to get on with it.  Next, I try to run the project, but I am faced with this: Error    1    The "ValidateXaml" task … more

  • SELECT from a Stored Procedure

    Occasionally I find myself wanting to SELECT from a SPROC in SQL Server.  Usually this is because I want to ORDER the results or filter them further with a WHERE clause.  Unfortunately, you can’t just do this: SELECT *FROM(EXEC mySproc foo, bar) There are several workarounds here, and the appropriate one depends mostly on whether you have any control over the use of the stored procedure, or how it works.  For example, you could choose to use a VIEW instead of a stored procedure.  Unfortunately, a VIEW usually won’t work if you need to pass parameters to your stored procedure (which I’m guessing you are).  If your sproc is literally just a wrapper for a query … more

  • Avoid Regions for Interfaces in Visual Studio

    Another quick tip related to the use of regions in your C# code – you can turn off the default behavior of wrapping interfaced implementations in regions via the options dialog.  Simply go to Tools –> Options –> Text Editor –> C# –> Advanced as shown in the screenshot below, and uncheck the “Surround generated code with #region” checkbox. more

  • Moving SVN Repositories to new Server

    Recently I had to move some SVN repositories from one server to another.  Here are the steps that worked for me, courtesy of Pete Freitag: Step 1: Back up SVN Repository Back up your existing repository with the following command.  Note that if you are using VisualSVN Server as I blogged about previously, you should be able to right-click within the VisualSVN server manager and get a command prompt that will have the correct paths and such to do this: svnadmin dump /path/repositoryfolder > repositoryname.svn_dump Notice the ‘>’ and its direction.  It’s important. Step 2: Create New SVN Repository (on new server) Next create a new repository.  You can … more

  • Silverlight Tools

    As we approach the launch of Silverlight 4 and today the 2010 Winter Olympics begin (which are streaming via Silverlight!) I thought I’d post about some Silverlight Tools you may find useful as you build Silverlight applications.  Some of these are also good WPF or general XAML tools.  I haven’t used all of these personally – some are on the list because people I respect have vouched for them.  If you have favorites of your own, please let me and other readers know via the comments. The Silverlight Basics You can Get Started with Silverlight by following the steps on the Silverlight site.  The Web Platform Installer makes it easy to get the SDK, developer runtimes, and … more

  • Tight Coupling, Legos, and Super Glue

    Building software applications is sometimes compared with building structures out of smaller components.  The children’s toys, Legos (and their generic brethren), come to mind and in fact make for a good analogy.  Given a set of components with varying characteristics (shape, color, etc, or in the case of software, objects with different behavior and state), it is possible to connect the components in order to create a larger structure, with (hopefully) more advanced capabilities. The reason Legos can connect to other Legos is because of the raised cylinders that correspond with similarly shaped cavities in the bottoms of the pieces.  These comprise the interface that allows … more

  • Hiring Inbound Marketing Score CARD

    In their book, Inbound Marketing (review), authors Shah and Halligan use a couple of acronyms that, maybe due to my military background, I thought could be improved.  The first one was VEPA, which I thought made a lot more sense as PAVE.  PAVE relates to qualities of a call to action, and it is easy to remember that if your call to action has these qualities it will PAVE the way to better results. In chapter 12, the authors describe a  “framework…for hiring and developing inbound marketing savvy employees.”  Like VEPA, this four-letter acronym is a nonsense word, DARC.  Again, it’s easy to see how this can be improved by converting it into an actual word, CARD, and … more

  • PAVE the Way to Effective Calls to Action

    In their book, Inbound Marketing (review), authors Shah and Halligan describe some key traits of effective calls to action.  The four important qualities of killer calls-to-action are that they be Valuable, Easy-to-Use, Prominent, and Action-Oriented (chapter 8).  The authors go on to suggest that this be referred to as “VEPA”, but I think we can do better than that.  By simply shifting the letters by 2 positions, this becomes the much more memorable mnemonic, PAVE: Prominent.  Your offer must stand out.  It should be difficult to miss.  Don’t make potential customers have to think about how to interact with you. Action-Oriented.  You want the visitor to … more

  • Inbound Marketing and Small Business Trends

    I recently read Dharmesh’s and Brian Halligan’s Inbound Marketing book, which has a lot of good tips for startup companies to follow in order to maximize their online reach and popularity.  Many of the tips are pretty obvious: start a blog, get people linking to you, build a following on twitter.  But there are some that are pretty easy to overlook, and at the end of the book is a very good appendix that is a checklist for any startup or small business to follow. One of the key points that describes the importance of Inbound Marketing, is that it is difficult for your competitors to one-up.  First, let me explain that inbound marketing differs from outbound in that you are … more

  • Prevent Resharper From Adding Regions

    A couple of days ago I was annoyed that Resharper was insisting on turning my abstract base NUnit test class with nothing in it but a shared [SetUp] method into a one line class with a collapsed Setup / Teardown region in it.  While I didn’t always feel this way, my experience has taught me that regions are a smell in your code.  They are a way to hide things you don’t want to deal with or look at.  It’s kind of like putting makeup over a melanoma instead of having a doctor remove it.  Here’s a pretty good analysis of why regions are a code smell if you’re interested. So anyway, I’m using Resharper and am in general a huge fan, and I know I can configure this thing every … more

  • How to set up TRIM with Win7 and SSD Drive

    I have an Intel X-25M SSD in my developer workstation machine (and it’s quite fast).  However, I’ve heard from others that over time SSD performance can degrade due to sub-block level fragmentation that occurs as a result of write combining.  Fortunately, newer SSD drives (like mine) support the TRIM command, but of course this only works if your system is sending the command to the drive. How Do I Know if Windows is Using TRIM for my SSD? Fortunately (and thanks to Ken), there is a simple command you can execute to determine if windows is sending TRIM commands to your SSD drive. Run the following command: fsutil behavior query disabledeletenotify If the result is 0, then … more