Can not use DicomObjects.NET in Visual Studio 2010

Problem Description

Sometimes people are facing the problem of using DicomObjects .NET version in Visual Studio 2010 due to error "DicomObjects is not decalred. It may be inaccessible due to its protection level".

Cause and Solution

This happens as by default any new Windows Form Application in Visual Studio 2010 is having the "Target framework" set to ".NET Framework 4 Client Profile". If you change it to anything that's NOT "Client Profile", the error will simply go away.

To change the target .NET Framework version or profile

  1. In Visual Studio, open the project you want to change.
  2. Right-click the project in Solution Explorer and then click Properties.
  3. In the Project Designer, locate the Target Framework list, as follows.
    • For Visual Basic projects, click the Compile tab and then click Advanced Compile Options. The Target Framework list is in the Advanced Compiler Settings dialog box.
    • For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).
    • For Visual F# projects, the Target Framework list is on the Application tab of the Project Designer.
  4. In the Target Framework list, select the .NET Framework version or profile that you want.
  5. Click OK, the project unloads and then reloads in the integrated development environment (IDE).

Note, we will try to make DicomObjects.NET compatible with the ".NET Framework 4 Client Profile". Or we will make a cut-down version of DicomObjects that's compatible with the client profile.

Relevance: