Daniel Hester

Microsoft Integration Architecture, Frameworks and Technologies

  Home  |   Contact  |   Syndication    |   Login
  8 Posts | 0 Stories | 2 Comments | 0 Trackbacks

News



Archives

Post Categories

Wednesday, May 9, 2012 #

When you try to add a BTAHL7 Common Project, e.g. BTAHL7V2XCommon, to your Visual Studio 2010 solution you may encounter the following error:

“Object reference not set to an instance of an object”

image

This error occurs when you try to create the BTAHL7 Common Project within a Solution Folder that matches the location of a Physical Folder within your solution’s root folder.  That is, you might be following a best practice of storing your Visual Studio Projects within a "Projects" solution folder that matches a physical folder within your Solution's root folder. In this case when you try to create your BTAHL7 Common Project within C:\Projects\MyHL7Solution\Projects by right-clicking on your Projects solution folder and choosing New Project you'll experience this error. 

The workaround is to create the project (temporarily) in the solution’s root folder, save it, exclude it from the solution, copy the project folder over to where you want it (e.g. C:\Projects\MyHL7Solution\Projects) and then add it back as an existing project, picking it up from its new location.  If your solution is already source controlled then you might want to create the BTAHL7 Common Project in a dummy solution and then copy it over to the folder where you want it so as to avoid a fight with source control.

Here are the repro steps:

Error when adding a new BTAHL7 Project to a Solution Folder - Repro Steps.docx