ASP.NET MVC 2 and Windows Azure

If you upgrade an Azure web instance to use ASP.NET MVC 2, make sure you mark the System.Web.Mvc reference as Copy Local = true.  Otherwise, your deployment will fail.  And you won’t get any good feedback from Windows Azure as to the cause of the problem.  So you’ll start searching the web for help, and […]

Simple Branching and Merging with SVN

It’s a good idea not to do too much work without checking something into source control.  By “too much work” I mean typically on the order of a couple of hours at most, and certainly it’s a good practice to check in anything you have before you leave the office for the day.  But what […]

Fix: SqlDeploy Task Fails with NullReferenceException at ExtractPassword

Still working on getting a TeamCity build working (see my last post).  Latest exception is: C:Program FilesMSBuildMicrosoftVisualStudiov9.0TeamDataMicrosoft.Data.Schema.SqlTasks.targets(120, 5): error MSB4018: The "SqlDeployTask" task failed unexpectedly. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Data.Schema.Common.ConnectionStringPersistence.ExtractPassword(String partialConnection, String dbProvider) at Microsoft.Data.Schema.Common.ConnectionStringPersistence.RetrieveFullConnection(String partialConnection, String provider, Boolean presentUI, String password) at Microsoft.Data.Schema.Sql.Build.SqlDeployment.ConfigureConnectionString(String connectionString, String databaseName) […]

Could Not Load Type Microsoft.Build.Framework.BuildEventContext

Setting up a TeamCity build and got this error: C:Program FilesMSBuildMicrosoftVisualStudiov9.0TeamDataMicrosoft.Data.Schema.SqlTasks.targets(80, 5): error MSB4018: The "SqlSetupDeployTask" task failed unexpectedly. System.TypeLoadException: Could not load type ‘Microsoft.Build.Framework.BuildEventContext’ from assembly ‘Microsoft.Build.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. at Microsoft.Build.BuildEngine.TaskExecutionModule.SetBatchRequestSize() at Microsoft.Build.BuildEngine.TaskExecutionModule..ctor(EngineCallback engineCallback, TaskExecutionModuleMode moduleMode, Boolean profileExecution) at Microsoft.Build.BuildEngine.NodeManager..ctor(Int32 cpuCount, Boolean childMode, Engine parentEngine) at Microsoft.Build.BuildEngine.Engine..ctor(Int32 numberOfCpus, Boolean isChildNode, Int32 parentNodeId, String […]

Open Visual Studio Files As Administrator

Working with IIS as your web server, or working with Azure projects, are two examples of situations in which Visual Studio (2008+) needs to be running as Administrator (on Windows Vista or Windows 7).  If you don’t run it as such, you may be faced with a dialog like this one (for Azure): Now of […]

Eliminate Repetition with Action<T>

Yesterday I was looking at some old code and refactoring it to clean it up (in this case I wasn’t the original author, but I’ve written code just like this).  The application in question was a simple process that had to run once per month, on demand, and so was coded up as an EXE […]