Technology Toolbox

Your technology Sherpa for the Microsoft platform

Jeremy Jameson - Founder and Principal

Search

Search

Core Development

There are 63 entries for the tag Core Development.

PowerShell Script for Clearing Windows Event Logs

Sure, you can just type "wevtutil el | % { wevtutil cl $_ }" whenever you feel like it, but how fun is that?!

Why I chose not to programmatically filter errors reported by ELMAH

If you think that programmatically filtering errors in ELMAH is as easy as specifying filters in Web.config, you might be in for a surprise.

Unit tests for filtering errors in ELMAH

In my previous post, I briefly mentioned the unit tests I created while trying to figure out why my ELMAH filter was not working as expected. Well, here they are for your enjoyment (or idle curiosity).

Use PowerShell to alleviate the pain of code coverage analysis in Visual Studio 2010 and .NET 3.5 solutions (e.g. SharePoint 2010)

This PowerShell script makes it much easier to perform code coverage analysis in Visual Studio 2010 and .NET Framework 3.5 solutions (e.g. SharePoint 2010).

Code coverage analysis with Visual Studio 2010 and .NET 3.5 solutions (e.g. SharePoint 2010)

It takes a little more work than expected, but you actually can "have your cake and eat it too" when it comes to Visual Studio 2010 code coverage analysis and .NET Framework 3.5 solutions (e.g. SharePoint 2010).

Git/GitHub issues

Follow along as I share my struggles using GitHub and the Git version control system.

Using the Entity Framework and LINQ to list the most popular posts from Subtext (a.k.a. Building TechnologyToolbox.com, part 10)

In my previous post, I shared the inner workings of the "Most Recent Posts" section on the Technology Toolbox home page. In this post, I'll show you how I built on that foundation to generate the content for the "Most Popular Posts" section.

Using the Entity Framework and LINQ to list the most recent posts from Subtext (a.k.a. Building TechnologyToolbox.com, part 9)

In a previous post, I mentioned how the new Technology Toolbox home page highlights the most recent blog posts from Subtext. In this post, I'll show you how easy this feature was to develop -- thanks to the Entity Framework and LINQ.

RecoverableException for .NET Framework Solutions

Do you remember the good ol' days before the ApplicationException class in the .NET Framework became " persona non grata "? I sure do. If you were to look at .NET code that I wrote years ago, you'd probably see ApplicationException being used all over...

ProcDump - An Easier Way to Create a Mini-Dump

In a previous post , I mentioned an issue I've been having with Expression Web 4 crashing on me. In that post, I mentioned a few ways that you can create a mini-dump for a process (e.g. with Visual Studio, WinDbg, or ADPlus). A couple of weeks ago...

C++ Compiler in Visual Studio 2010 Must Target .NET Framework 4

Another "hiccup" this week after upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 ... This morning I discovered that when you upgrade a managed C++ project from Visual Studio 2008 to Visual Studio 2010, the project is updated...

Suppress CS1607 Warning for TFS 2010 Builds

Here's another issue I encountered when upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 ... While it's generally a good assumption that a solution that builds without error in Visual Studio 2008 (and on a TFS 2008 build server...

Updated Path to tf.exe for TFS 2010 Builds

After upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 , I found that I needed to tweak my TfsBuild.proj file in order to successfully build on my new TFS 2010 build server. In a previous post, I detailed the process that I recommend...

Test Projects in Visual Studio 2010 Must Target .NET Framework 4

Last week I installed Visual Studio 2010 on my primary desktop. This morning, I opened my Fabrikam.Demo solution in the new version of Visual Studio, but chose not to upgrade the target framework when prompted by Visual Studio during the solution upgrade...

Leveraging the Power of Typed DataSets, IEnumerable<>, and LINQ

In my previous post , I extolled my love of typed DataSets in .NET because they are not only quick to design and update, but also very easy to understand. Essentially, if you can read an entity-relationship model (à la ERwin or a Visio database...

Still Crazy (About Typed DataSets) After All These Years

First off, my apologies to Paul Simon regarding the title of this blog post -- but I simply couldn't resist ;-) When architecting and building solutions for customers, I tend to make heavy use of typed DataSets. I believe I used them on my very...

Test-Driven Development (TDD) in the Real World, Part 3 (a.k.a. the EncryptionService)

In my previous post , I provided a walkthrough of Test-Driven Development (TDD), based on a very simple scenario (truncating a string to a specific number of characters). In this post, I'll provide another example using a more complex scenario. Suppose...

Test Driven Development (TDD) in the Real World, Part 2

In part 1 of this post, I provided my high-level thoughts on doing Test Driven Development (TDD) in the real world, but I didn't get around to walking through an actual sample. To start off simple (but still real world), let's imagine we have a scenario where we need to truncate a string to a limited number of characters for display or output purposes. However, instead of just chopping off the string at the specified number of characters, we want to apply a little "intell

TDD in the Real World, Part 1

Earlier today I presented a "Knowledge Transfer" session to a team of developers on my current project. If you've ever worked with consultants, you've probably experienced a "KT" session or something similar. In essence, it's just a meeting intended to...

Automated Deployments to DEV from the Latest Build Folder

Last month I wrote a post detailing how to increment the assembly version for each build . However, incrementing the assembing version is only part of my recommended build and deployment process . The following figure illustrates how deployments to...

Unit Tests for ICloneable

A few years ago I developed a class ( SharePointSearchUrlBuilder ) for working with SharePoint Search URLs. The class is used to easily build or parse the various query string parameters used by SharePoint Search (e.g. keywords, search scope, additional...

Incrementing the Assembly Version for Each Build

Last summer I wrote a post about best practices for .NET assembly versioning and made the following statement: The AssemblyFileVersionAttribute should be incremented automatically as part of the build process. In the comments for that post, someone...

Logging Exceptions in .NET Applications

Last summer I wrote a post introducing my simple, but highly effective approach to logging -- including a Logger class that is really just a thin wrapper around the System.Diagnostics.TraceSource class. A few months ago, I enhanced the Logger class...

The "Copy Local" Bug in Visual Studio

If you've ever worked with me on a Microsoft Office SharePoint Server (MOSS) 2007 project -- or if you've read my Sample Walkthrough of the DR.DADA Approach to SharePoint -- then you've probably seen the following comment: Note: Referenced assemblies...

SketchPath - The XPath Tool

I added another tool to my Toolbox yesterday: SketchPath. The SketchPath site labels it as "The XPath Tool" but I'd say it more like " The XPath Tool." I've seen a few other tools for quickly building and testing XPath expressions against an XML...

Compiling C++ Projects with Team Foundation Build

As I mentioned in my previous post , this week I incorporated Password Minder into my "Toolbox" Visual Studio solution that is scheduled to build daily through Team Foundation Server (TFS). It's not that I really need daily builds of Password Minder;...

Recommendations for Code Analysis

In my previous post , I briefly mentioned the Code Analysis feature of Visual Studio in the context of using check-in policies with Team Foundation Server (TFS). However, there's a lot more to talk about with regards to using Code Analysis. If you...

Recommended Check-In Policies for Team Foundation Server

I love using Team Foundation Server (TFS). There's just an amazing amount of "goodness" for software development that comes out-of-the-box; and there's even more available from Microsoft and other sources in the form of add-ons (many of which are free...

Best Practices for SCM and the Daily Build Process

In a previous post, I briefly discussed a simple branching strategy for Team Foundation Server (TFS). This was somewhat of a follow-up to another post in which I briefly referenced a great article titled The Importance of Branching Models in SCM . If...

Build and Deployment Overview

This post provides a high-level walkthrough of the build and deployment process that I typically recommend on projects that I am involved with. It includes a series of illustrations that capture key concepts at various points in time. Specific parts of...

Debugging Symbols -- They're Not Just for Debug Builds Anymore

I started another new project this week. Typically one of the first tasks on any new development project is to create a Development Plan that provides consistent guidelines and processes for the Development team. On this new project, another Microsoft...

Development and Build Environments

In a previous post , I briefly touched on the "DEV-TEST-PROD" triad of environments that I typically recommend (at a minimum) for every organization doing any form of software development. This post describes, in greater detail, the various environments...

Comparing Source Code Branches

During the more than three years I spent helping Agilent Technologies migrate their Internet site from their legacy, proprietary platform to Microsoft Office SharePoint Server (MOSS) 2007, we unfortunately never used Team Foundation Server (TFS). Instead...

Using SysPrep'ed VHDs for New Hyper-V Virtual Machines

As noted in my previous post , I spent 7 days in "alpha" training last week for SharePoint 2010. Consequently, one of my goals for this week was to update my "dogfood" VM with the CTP build of SharePoint Server 2010, so that I can continue building...

Configuring Logging in ASP.NET Applications (and SharePoint)

This post continues on the original post for my simple, but highly effective approach to logging and the follow-up post which introduced configuring logging for console applications . Obviously not all solutions are simple console-based applications...

Configuring Logging in a Console Application

In my previous post, I introduced my simple, but highly effective approach to logging . As promised, this post introduces how to configure logging (based on a simple console application). As noted in my previous post, one or more trace listeners can...

A Simple, but Highly Effective Approach to Logging

A common question that frequently arises both with customers and fellow consultants is what do I recommend for logging? As experienced software developers, we know that there are going to be errors in our solution -- as well as other important events...

Environment Naming Conventions

One of the challenges I see in organizations that I work with is the lack of naming conventions for various environments -- or sometimes naming conventions that provide little or no value. For about the last ten years, I've been a strong proponent...

Tell Mode vs. Ask Mode

The project I am currently working on is nearing the end. Last week we reached our "Feature Complete" milestone and now we have formally transitioned into the "Stabilizing" phase. In a couple of team meetings this week, I mentioned the concepts of...

Shared Assembly Info in Visual Studio Projects

Yesterday I introduced the concept of linked files in Visual Studio solutions with a follow-up on my recommendation for configuring a custom dictionary to eliminate CA1704 code analysis warnings. Another practical application of linked files is what...

Best Practices for .NET Assembly Versioning

Whenever a new .NET assembly project is created in Visual Studio, a file named AssemblyInfo is created that contains attributes used to define the version of the assembly during compilation. Using assembly versions effectively enables various team...

CA1704 Code Analysis Warning and Using Custom Dictionaries in Visual Studio

In my previous post , I introduced the concept of linking files in Visual Studio solutions. A good use of this feature is specifying a custom dictionary for your solution. Once you enable Code Analysis on your projects, you are likely to encounter...

Linked Files in Visual Studio Solutions

A couple of years ago, I wrote a post introducing my system for structuring Visual Studio solutions . However, I apparently forgot to post a follow-up providing additional details, such as configuring assembly versioning and what I like to call "shared...

Temporary ASP.NET Files Are Not Deleted

Yesterday afternoon, I discovered that there were 64,725 items (consuming 2.41 GB) in the C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root folder of my development VM for Microsoft Office SharePoint Server (MOSS) 2007. Apparently...

Redirecting stderr to stdout

Yesterday I replied to an email from a teammate in which I incorrectly stated that you can't redirect stderr to stdout in DOS -- er, I mean a command window in Microsoft Windows. I would have sworn the last time I tried something like the following...

XSLT "Identity Transform"

Last week, I was explaining to a teammate that it is often helpful to use the XSLT "Identity Transform" in order to view the raw XML -- in other words, without any "real" transformation by the XSL stylesheet. For example, suppose you need to customize...

DiffMerge - A Better Differencing Tool

Last summer, I added DiffMerge to my Toolbox and I haven't used WinDiff since. DiffMerge can do everything WinDiff can, plus a whole lot more -- like intra-line highlighting, merging, and comparing files using configurable rulesets (although you'll...

To Dispose or not to Dispose -- that is the question

Last Saturday, another team member sent an email out to the team inquiring about the "MOSS object disposal problem" (as he termed it). Essentially, he was asking if anytime he referenced the ParentWeb property on an object, whether or not he needed...

ArgumentNullException with Optional PublishingPage.Description Property (with some thoughts on breaking the build, too)

Yesterday morning I broke the build. Ouch. Technically speaking, the changes that I checked in did not break the build, per se, but rather my changes caused a nasty ArgumentNullException while redeploying our SharePoint site. In "Developerspeak...

Visual Studio Macro for Collapsing All Items in Solution Explorer

Along with my Visual Studio macros for unloading/reloading projects in a solution , another macro that I use just as much, if not more frequently, is my CollapseAllItems() macro: Public Sub CollapseAllItems() Dim solutionExplorer As Window = _...

Visual Studio Macros for Unloading/Reloading Projects

As promised in a post last week, here are the macros that I use to quickly unload or reload dozens of projects in a large Visual Studio solution. Hmmm, perhaps effortlessly is a better word choice -- considering I might need to wait 30 seconds or so for...

Tracing and Logging from Visual Studio Macros

As I mentioned in a post last week, I often use macros in Visual Studio to automate development tasks. Before sharing some of my most frequently used macros, however, I wanted to first introduce the method I use to trace events and log messages while...

Large Visual Studio Solutions and Loading/Unloading Projects

As I noted in my previous post , I typically work with "large" Visual Studio solutions. Note that I put this in quotes, because the definition of "large" will likely vary widely based on your individual experience. Note that I'm not referring to "large...

Branching Strategy in Team Foundation Server

While attending TechReady (an internal Microsoft training conference) last week, I learned a lot -- not only about future versions of our products, but also numerous tips and tricks for current versions. One of the most valuable insights I gained was...

Visual Studio Team System 2010 Week on Channel 9!

Visual Studio just keeps getting better and better! Check out the 20 new videos that will be released over the course of this week announcing the most exciting new features in Visual Studio 2010. The Technical Evanglelists (boy, isn't that a dream...

A Better Way to Build SharePoint Solution Packages (and CAB Files)

Up until about an hour ago, I'd been using post-build events on my Visual Studio projects to create SharePoint solution packages (WSPs). However, while this worked reasonably well, this method always bothered me a little because the post-build events...

Memory Leak in SPLimitedWebPartManager (a.k.a. IDisposables Containing IDisposables)

Back in February, Roger Lamb kicked off his MSDN blog with a great post ( SharePoint 2007 and WSS 3.0 Dispose Patterns by Example ). It provides numerous code samples that demonstrate memory leaks commonly produced when working with the SharePoint object...

"TFS Lite" for WSS v3

In my previous post , I introduced my "TFS Lite" SharePoint site template that I've been using for years as a simple scenario/task/bug/risk/milestone tracking "application" with various projects and customers. In today's post, I'll discuss some of the...

"TFS Lite" for WSS v2

[Update (2008-04-07): "TFS Lite" for WSS v3 is now available.] For almost as long as I can remember (okay, not really that long -- but at least as far back as 2003), I've been using SharePoint lists as a bug tracking tool on almost all of the customer...

Installing Visual Studio 2005 Service Pack 1

Stepping into the "Wayback Machine" for a moment, I realized that I hinted about a problem with installing Visual Studio 2005 SP1 , but I never got around to blogging about it in more detail. Unfortunately, I just got bit by this problem yet again this...

Save HUGE Amounts of Disk Space by Slipstreaming Service Packs

This is a little embarrassing, but I captured numerous screenshots back in April while rebuilding my SharePoint development VM, but I never got around to writing a blog post to actually share this information with anyone. Well, it's long overdue, but...

Structuring Visual Studio Solutions

Over the years, I have refined how I create Visual Studio projects based on lessons learned and new capabilities provided with each subsequent release of Visual Studio. When starting a new project from scratch, I start by creating a blank Visual Studio...

Testing for Expected Exceptions with Visual Studio

Since I seem to be on a roll blogging this morning, I thought I'd see if I could get one more in before my baby girl wakes up to have breakfast with "Da-da." When transitioning a couple of years ago from using NUnit to Visual Studio 2005, I noticed...